You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cucumber_cpp/acceptance_test/test.bats
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -154,3 +154,25 @@ teardown() {
154
154
assert_failure
155
155
assert_output --partial "tests : 1/2 passed"
156
156
}
157
+
158
+
@test "Test failing hook before results in error" {
159
+
run .build/Host/cucumber_cpp/acceptance_test/Debug/cucumber_cpp.acceptance_test run --feature cucumber_cpp/acceptance_test/features --tag "@fail_scenariohook_before" --report console
160
+
assert_failure
161
+
assert_output --partial "skipped Given a given step"
162
+
assert_output --partial "tests : 0/1 passed"
163
+
}
164
+
165
+
@test "Test failing hook after results in error" {
166
+
run .build/Host/cucumber_cpp/acceptance_test/Debug/cucumber_cpp.acceptance_test run --feature cucumber_cpp/acceptance_test/features --tag "@fail_scenariohook_after" --report console
167
+
assert_failure
168
+
assert_output --partial "Given a given step"
169
+
assert_output --partial "-> done"
170
+
assert_output --partial "tests : 0/1 passed"
171
+
}
172
+
173
+
@test "Test throwing hook results in error" {
174
+
run .build/Host/cucumber_cpp/acceptance_test/Debug/cucumber_cpp.acceptance_test run --feature cucumber_cpp/acceptance_test/features --tag "@throw_scenariohook" --report console
175
+
assert_failure
176
+
assert_output --partial "skipped Given a given step"
0 commit comments