feat(hint): Add test for hint

This commit is contained in:
marisa
2019-11-11 17:19:50 +01:00
parent 795b6e3480
commit ce9fa6ebbf
3 changed files with 21 additions and 9 deletions

View File

@@ -2,10 +2,10 @@
name = "compFailure"
path = "compFailure.rs"
mode = "compile"
hint = """"""
hint = ""
[[exercises]]
name = "testFailure"
path = "testFailure.rs"
mode = "test"
hint = """"""
hint = "Hello!"

View File

@@ -105,3 +105,14 @@ fn run_single_test_no_exercise() {
.assert()
.code(1);
}
#[test]
fn get_hint_for_single_test() {
Command::cargo_bin("rustlings")
.unwrap()
.args(&["h", "testFailure"])
.current_dir("tests/fixture/failure")
.assert()
.code(0)
.stdout("Hello!\n");
}