diff options
| author | marisa <mokou@posteo.de> | 2019-11-11 17:19:50 +0100 |
|---|---|---|
| committer | marisa <mokou@posteo.de> | 2019-11-11 17:19:50 +0100 |
| commit | ce9fa6ebbfdc3e7585d488d9409797285708316f (patch) | |
| tree | cb60de10bb7c275781c5ade0954604ca3d2d304b /tests | |
| parent | 795b6e348094a898e9227a14f6232f7bb94c8d31 (diff) | |
feat(hint): Add test for hint
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/fixture/failure/info.toml | 4 | ||||
| -rw-r--r-- | tests/integration_tests.rs | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/tests/fixture/failure/info.toml b/tests/fixture/failure/info.toml index 20d570a..e5949f9 100644 --- a/tests/fixture/failure/info.toml +++ b/tests/fixture/failure/info.toml @@ -2,10 +2,10 @@ name = "compFailure" path = "compFailure.rs" mode = "compile" -hint = """""" +hint = "" [[exercises]] name = "testFailure" path = "testFailure.rs" mode = "test" -hint = """""" +hint = "Hello!" diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 652ba60..24268ec 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -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"); +} |
