summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/fixture/failure/testNotPassed.rs4
-rw-r--r--tests/integration_tests.rs10
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/fixture/failure/testNotPassed.rs b/tests/fixture/failure/testNotPassed.rs
new file mode 100644
index 0000000..a9fe88d
--- /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 a077918..3acaf90 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -77,6 +77,16 @@ fn run_single_test_failure() {
}
#[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")
.unwrap()