summaryrefslogtreecommitdiff
path: root/tests/integration_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration_tests.rs')
-rw-r--r--tests/integration_tests.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
index 683e564..0f49b5a 100644
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -159,3 +159,25 @@ fn run_test_exercise_does_not_prompt() {
.code(0)
.stdout(predicates::str::contains("I AM NOT DONE").not());
}
+
+#[test]
+fn run_single_test_success_with_output() {
+ Command::cargo_bin("rustlings")
+ .unwrap()
+ .args(&["--nocapture", "r", "testSuccess"])
+ .current_dir("tests/fixture/success/")
+ .assert()
+ .code(0)
+ .stdout(predicates::str::contains("THIS TEST TOO SHALL PAS"));
+}
+
+#[test]
+fn run_single_test_success_without_output() {
+ Command::cargo_bin("rustlings")
+ .unwrap()
+ .args(&["r", "testSuccess"])
+ .current_dir("tests/fixture/success/")
+ .assert()
+ .code(0)
+ .stdout(predicates::str::contains("THIS TEST TOO SHALL PAS").not());
+} \ No newline at end of file