diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-07 13:00:13 -0500 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-07 13:00:13 -0500 |
commit | 728606df9170aef6dbc2fcf43901b3e2d8368fcc (patch) | |
tree | e4b4a4de1ba06315f18ff78ec6d21b27f6f89515 /activesupport | |
parent | f12a2b4820dfe4af3d3881f69f7709fb21eba11f (diff) | |
download | rails-728606df9170aef6dbc2fcf43901b3e2d8368fcc.tar.gz rails-728606df9170aef6dbc2fcf43901b3e2d8368fcc.tar.bz2 rails-728606df9170aef6dbc2fcf43901b3e2d8368fcc.zip |
Just rescue exception rather than checking for both miniunit and test/unit
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/abstract_unit.rb | 1 | ||||
-rw-r--r-- | activesupport/test/test_test.rb | 9 |
2 files changed, 3 insertions, 7 deletions
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index 9d8c252f86..a11ff25e41 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -5,6 +5,7 @@ require 'test/unit' $:.unshift "#{File.dirname(__FILE__)}/../lib" $:.unshift File.dirname(__FILE__) require 'active_support' +require 'active_support/test_case' if RUBY_VERSION < '1.9' $KCODE = 'UTF8' diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb index f3d29e6de4..89fae1a9e4 100644 --- a/activesupport/test/test_test.rb +++ b/activesupport/test/test_test.rb @@ -1,5 +1,4 @@ require 'abstract_unit' -require 'active_support/test_case' class AssertDifferenceTest < ActiveSupport::TestCase def setup @@ -66,10 +65,8 @@ class AssertDifferenceTest < ActiveSupport::TestCase @object.increment end fail 'should not get to here' - rescue MiniTest::Assertion => e + rescue Exception => e assert_equal "<3> expected but was\n<2>.", e.message - rescue Test::Unit::AssertionFailedError => e - assert_equal "<1 + 1> was the expression that failed.\n<3> expected but was\n<2>.", e.message end def test_array_of_expressions_identify_failure_when_message_provided @@ -77,10 +74,8 @@ class AssertDifferenceTest < ActiveSupport::TestCase @object.increment end fail 'should not get to here' - rescue MiniTest::Assertion => e + rescue Exception => e assert_equal "something went wrong.\n<3> expected but was\n<2>.", e.message - rescue Test::Unit::AssertionFailedError => e - assert_equal "something went wrong.\n<1 + 1> was the expression that failed.\n<3> expected but was\n<2>.", e.message end else def default_test; end |