Skip to content

Commit

Permalink
Add specs testing exceptions at various points in the code
Browse files Browse the repository at this point in the history
  • Loading branch information
noahgibbs committed Nov 22, 2023
1 parent 91ff164 commit 0d83855
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
----------- app code
raise_exception_before_shoes_app_body
Shoes.app do
no_such_method
end
----------- test code
assert true, "Even if the test code is fine, this spec should fail because the app fails."
7 changes: 7 additions & 0 deletions cases/test_code/exceptions/raise_in_shoes_app.sspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
----------- app code
Shoes.app do
raise_exception_inside_shoes_app_body
end
----------- test code
assert true, "Even if the test code is fine, this spec should fail because the app fails."
6 changes: 6 additions & 0 deletions cases/test_code/exceptions/raise_in_test_code.sspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
----------- app code
Shoes.app do
end
----------- test code
raise_exception_in_test_code
4 changes: 3 additions & 1 deletion results/niente/expected/results-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@
pass: :pass
skip: :skip
test_code/exceptions:
no_method: :error
raise_before_shoes_app: :error
raise_in_shoes_app: :error
raise_in_test_code: :error
4 changes: 3 additions & 1 deletion results/scarpe-wasm/expected/results-wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@
pass: :error
skip: :error
test_code/exceptions:
no_method: :error
raise_before_shoes_app: :error
raise_in_shoes_app: :error
raise_in_test_code: :error
4 changes: 3 additions & 1 deletion results/scarpe-webview/expected/results-local-calzini.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@
pass: :pass
skip: :skip
test_code/exceptions:
no_method: :error
raise_before_shoes_app: :error
raise_in_shoes_app: :error
raise_in_test_code: :error
4 changes: 3 additions & 1 deletion results/scarpe-webview/expected/results-local-tiranti.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@
pass: :pass
skip: :skip
test_code/exceptions:
no_method: :error
raise_before_shoes_app: :error
raise_in_shoes_app: :error
raise_in_test_code: :error

0 comments on commit 0d83855

Please sign in to comment.