mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
started converting AS::TestCase to minitest
This commit is contained in:
parent
f65559fcc2
commit
aa7857b617
1 changed files with 12 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
require 'test/unit/testcase'
|
||||
require 'minitest/unit'
|
||||
require 'active_support/testing/setup_and_teardown'
|
||||
require 'active_support/testing/assertions'
|
||||
require 'active_support/testing/deprecation'
|
||||
|
@ -9,7 +9,7 @@ require 'active_support/testing/mochaing'
|
|||
require 'active_support/core_ext/kernel/reporting'
|
||||
|
||||
module ActiveSupport
|
||||
class TestCase < ::Test::Unit::TestCase
|
||||
class TestCase < ::MiniTest::Unit::TestCase
|
||||
Assertion = MiniTest::Assertion
|
||||
alias_method :method_name, :name if method_defined? :name
|
||||
alias_method :method_name, :__name__ if method_defined? :__name__
|
||||
|
@ -24,5 +24,15 @@ module ActiveSupport
|
|||
include ActiveSupport::Testing::Deprecation
|
||||
include ActiveSupport::Testing::Pending
|
||||
extend ActiveSupport::Testing::Declarative
|
||||
|
||||
# test/unit backwards compatibility methods
|
||||
alias :assert_raise :assert_raises
|
||||
alias :assert_not_nil :refute_nil
|
||||
alias :assert_not_equal :refute_equal
|
||||
alias :assert_no_match :refute_match
|
||||
|
||||
def assert_nothing_raised(*args)
|
||||
yield
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue