From 7cf0d5d15e02ccd52e6d8dd53dcd6f0d7adf888f Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Thu, 9 May 2019 20:16:06 +0300 Subject: [PATCH] Add not passing integration test --- tests/fixture/failure/testNotPassed.rs | 4 ++++ tests/integration_tests.rs | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/fixture/failure/testNotPassed.rs diff --git a/tests/fixture/failure/testNotPassed.rs b/tests/fixture/failure/testNotPassed.rs new file mode 100644 index 00000000..a9fe88dd --- /dev/null +++ b/tests/fixture/failure/testNotPassed.rs @@ -0,0 +1,4 @@ +#[test] +fn not_passing() { + assert!(false); +} diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index a0779182..3acaf908 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -76,6 +76,16 @@ fn run_single_test_failure() { .code(1); } +#[test] +fn run_single_test_not_passed() { + Command::cargo_bin("rustlings") + .unwrap() + .args(&["r", "testNotPassed.rs"]) + .current_dir("tests/fixture/failure/") + .assert() + .code(1); +} + #[test] fn run_single_test_no_filename() { Command::cargo_bin("rustlings")