aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/test_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-11-07 12:45:48 -0500
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-07 12:45:48 -0500
commit18099b0fd53b8f9ba88ef46bdd910347f03c72c5 (patch)
tree763fef4bb4966040d2b80c19301bf9572feb02db /activesupport/test/test_test.rb
parent7b28a55a2bc9bedd5a8c8dec0a8a02166927ef16 (diff)
downloadrails-18099b0fd53b8f9ba88ef46bdd910347f03c72c5.tar.gz
rails-18099b0fd53b8f9ba88ef46bdd910347f03c72c5.tar.bz2
rails-18099b0fd53b8f9ba88ef46bdd910347f03c72c5.zip
Rework testing extensions to reflect the recent miniunit upheaval
Diffstat (limited to 'activesupport/test/test_test.rb')
-rw-r--r--activesupport/test/test_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb
index d4ae221f4f..f3d29e6de4 100644
--- a/activesupport/test/test_test.rb
+++ b/activesupport/test/test_test.rb
@@ -66,6 +66,8 @@ class AssertDifferenceTest < ActiveSupport::TestCase
@object.increment
end
fail 'should not get to here'
+ rescue MiniTest::Assertion => 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
@@ -75,6 +77,8 @@ class AssertDifferenceTest < ActiveSupport::TestCase
@object.increment
end
fail 'should not get to here'
+ rescue MiniTest::Assertion => 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
@@ -84,8 +88,10 @@ class AssertDifferenceTest < ActiveSupport::TestCase
end
# These should always pass
-class NotTestingThingsTest < Test::Unit::TestCase
- include ActiveSupport::Testing::Default
+if defined? ActiveSupport::Testing::Default
+ class NotTestingThingsTest < Test::Unit::TestCase
+ include ActiveSupport::Testing::Default
+ end
end
class AlsoDoingNothingTest < ActiveSupport::TestCase