diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/dev-cmd/test.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/formula_assertions.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/dev-cmd/test.rb b/Library/Homebrew/dev-cmd/test.rb index a8661179f..c678171ac 100644 --- a/Library/Homebrew/dev-cmd/test.rb +++ b/Library/Homebrew/dev-cmd/test.rb @@ -83,7 +83,7 @@ module Homebrew exec(*args) end end - rescue MiniTest::Assertion => e + rescue ::Test::Unit::AssertionFailedError => e ofail "#{f.full_name}: failed" puts e.message rescue Exception => e diff --git a/Library/Homebrew/formula_assertions.rb b/Library/Homebrew/formula_assertions.rb index f81087a3d..2ba5767a7 100644 --- a/Library/Homebrew/formula_assertions.rb +++ b/Library/Homebrew/formula_assertions.rb @@ -3,6 +3,11 @@ module Homebrew require "test/unit/assertions" include ::Test::Unit::Assertions + # TODO: remove this when we no longer support Ruby 2.0. + unless defined?(Test::Unit::AssertionFailedError) + Test::Unit::AssertionFailedError = MiniTest::Assertion + end + # Returns the output of running cmd, and asserts the exit status def shell_output(cmd, result = 0) ohai cmd |
