Permalink
Browse files

Set AS::TestCase::Assertion to the underlying test exception for eith…

…er miniunit or test/unit
  • Loading branch information...
1 parent ae9581e commit 00f72cf99d3653198a1e080964d396fbeb23e52e @jeremy jeremy committed Nov 7, 2008
Showing with 4 additions and 1 deletion.
  1. +4 −1 activesupport/lib/active_support/test_case.rb
View
5 activesupport/lib/active_support/test_case.rb
@@ -13,14 +13,17 @@ module ActiveSupport
require 'test/unit'
MiniTest::Unit.class_variable_set('@@installed_at_exit', autorun_enabled)
- class TestCase < ::Test::Unit::TestCase; end
+ class TestCase < ::Test::Unit::TestCase
+ Assertion = MiniTest::Assertion
+ end
# Test::Unit compatibility.
rescue LoadError
require 'test/unit/testcase'
require 'active_support/testing/default'
class TestCase < ::Test::Unit::TestCase
+ Assertion = Test::Unit::AssertionFailedError
include ActiveSupport::Testing::Default
end
end

0 comments on commit 00f72cf

Please sign in to comment.