Merge pull request #2823 from MikeMcQuaid/test-simplify-minitest
test: simplify minitest inclusion.
This commit is contained in:
commit
3ce667f3b9
@ -83,7 +83,7 @@ module Homebrew
|
||||
exec(*args)
|
||||
end
|
||||
end
|
||||
rescue Assertions::FailedAssertion => e
|
||||
rescue MiniTest::Assertion => e
|
||||
ofail "#{f.full_name}: failed"
|
||||
puts e.message
|
||||
rescue Exception => e
|
||||
|
||||
@ -1,26 +1,6 @@
|
||||
module Homebrew
|
||||
module Assertions
|
||||
if defined?(Gem)
|
||||
begin
|
||||
gem "minitest", "< 5.0.0"
|
||||
rescue Gem::LoadError
|
||||
require "test/unit/assertions"
|
||||
else
|
||||
require "minitest/unit"
|
||||
require "test/unit/assertions"
|
||||
end
|
||||
else
|
||||
require "test/unit/assertions"
|
||||
end
|
||||
|
||||
if defined?(MiniTest::Assertion)
|
||||
FailedAssertion = MiniTest::Assertion
|
||||
elsif defined?(Minitest::Assertion)
|
||||
FailedAssertion = Minitest::Assertion
|
||||
else
|
||||
FailedAssertion = Test::Unit::AssertionFailedError
|
||||
end
|
||||
|
||||
require "test/unit/assertions"
|
||||
include ::Test::Unit::Assertions
|
||||
|
||||
# Returns the output of running cmd, and asserts the exit status
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user