When Im writing tests and I do:
assert_raise RuntimeError, raise(“raising”)
Then I run the test is says the test failed and I have 1 error:
RuntimeError: hey
Should assert_raise catch that error and say the test passed?
Thanks for your time and help.
Ben J. wrote:
When Im writing tests and I do:
assert_raise RuntimeError, raise(“raising”)
Then I run the test is says the test failed and I have 1 error:
RuntimeError: hey
Should assert_raise catch that error and say the test passed?
Thanks for your time and help.
I figured it out, you need to pass a block, like:
assert_raise(RuntimeError) { raise(“raising”) }