summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/fixture/failure/info.toml4
-rw-r--r--tests/integration_tests.rs11
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");
+}