Skip to content

Commit aa7857b

Browse files
committed
started converting AS::TestCase to minitest
1 parent f65559f commit aa7857b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

activesupport/lib/active_support/test_case.rb

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require 'test/unit/testcase'
1+
require 'minitest/unit'
22
require 'active_support/testing/setup_and_teardown'
33
require 'active_support/testing/assertions'
44
require 'active_support/testing/deprecation'
@@ -9,7 +9,7 @@
99
require 'active_support/core_ext/kernel/reporting'
1010

1111
module ActiveSupport
12-
class TestCase < ::Test::Unit::TestCase
12+
class TestCase < ::MiniTest::Unit::TestCase
1313
Assertion = MiniTest::Assertion
1414
alias_method :method_name, :name if method_defined? :name
1515
alias_method :method_name, :__name__ if method_defined? :__name__
@@ -24,5 +24,15 @@ def self.for_tag(tag)
2424
include ActiveSupport::Testing::Deprecation
2525
include ActiveSupport::Testing::Pending
2626
extend ActiveSupport::Testing::Declarative
27+
28+
# test/unit backwards compatibility methods
29+
alias :assert_raise :assert_raises
30+
alias :assert_not_nil :refute_nil
31+
alias :assert_not_equal :refute_equal
32+
alias :assert_no_match :refute_match
33+
34+
def assert_nothing_raised(*args)
35+
yield
36+
end
2737
end
2838
end

0 commit comments

Comments
 (0)