Skip to content

Commit

Permalink
Remove Test::Unit setup
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Jul 19, 2014
1 parent 8d3d250 commit cb679b8
Showing 1 changed file with 8 additions and 22 deletions.
30 changes: 8 additions & 22 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
$KCODE = 'u' if RUBY_VERSION <= '1.9'

# Use minitest if we can, otherwise fallback to test-unit.
begin
require 'minitest/autorun'
TEST_CASE = defined?(Minitest::Test) ? Minitest::Test : MiniTest::Unit::TestCase
require 'minitest/autorun'
TEST_CASE = defined?(Minitest::Test) ? Minitest::Test : MiniTest::Unit::TestCase

# TODO: Remove these aliases and update tests accordingly.
class TEST_CASE
alias :assert_raise :assert_raises
alias :assert_not_equal :refute_equal
# TODO: Remove these aliases and update tests accordingly.
class TEST_CASE
alias :assert_raise :assert_raises
alias :assert_not_equal :refute_equal

def assert_nothing_raised(*args)
yield
end
def assert_nothing_raised(*args)
yield
end
rescue LoadError
require 'test/unit'
TEST_CASE = Test::Unit::TestCase
end

require 'bundler/setup'
Expand Down Expand Up @@ -45,14 +39,6 @@ def teardown
super
end

# Ignore Test::Unit::TestCase failing if the test case does not contain any
# test, otherwise it will blow up because of this base class.
#
# TODO: remove when test-unit is not used anymore.
def default_test
nil
end

protected

def translations
Expand Down

0 comments on commit cb679b8

Please sign in to comment.