-
Notifications
You must be signed in to change notification settings - Fork 558
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Block-assertions (eg assert_output) now error if raised inside the …
…block. (casperisfine) This will potentially cause some of your tests to fail: ```ruby assert_raises do # 4) bypassed assert_output "blah\n" do # 3) rescues and raises UnexpectedError puts "not_blah" # 1) output raise "boom!" # 2) raised end end ``` Re-order to: ```ruby assert_output "blah\n" do # 4) captured and compared assert_raises RuntimeError do # 3) caught puts "blah" # 1) output raise "boom!" # 2) raised end end ``` Closes #809. [git-p4: depot-paths = "//src/minitest/dev/": change = 12414]
- Loading branch information
Showing
2 changed files
with
141 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Not sure if you added this for explictness, but if not, since
Assertion
inherits fromException
, therescue => e
won't catch it.