Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: simplify minitest inclusion. #2823

Merged
merged 1 commit into from
Jun 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test
exec(*args)
end
end
rescue Assertions::FailedAssertion => e
rescue MiniTest::Assertion => e
ofail "#{f.full_name}: failed"
puts e.message
rescue Exception => e
Expand Down
22 changes: 1 addition & 21 deletions Library/Homebrew/formula_assertions.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down