aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/test_case.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-05 15:46:17 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-06 15:50:47 -0800
commitaa7857b61742d2785a1bec39269d25031c840757 (patch)
tree13acaf69282872e1c44e1762855081c97a9059d1 /activesupport/lib/active_support/test_case.rb
parentf65559fcc2745afcbfc03dd8b25ec9187f162029 (diff)
downloadrails-aa7857b61742d2785a1bec39269d25031c840757.tar.gz
rails-aa7857b61742d2785a1bec39269d25031c840757.tar.bz2
rails-aa7857b61742d2785a1bec39269d25031c840757.zip
started converting AS::TestCase to minitest
Diffstat (limited to 'activesupport/lib/active_support/test_case.rb')
-rw-r--r--activesupport/lib/active_support/test_case.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb
index 707544e594..6903733625 100644
--- a/activesupport/lib/active_support/test_case.rb
+++ b/activesupport/lib/active_support/test_case.rb
@@ -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