2008-11-23 17:48:36 -05:00
|
|
|
require 'test/unit/testcase'
|
|
|
|
require 'active_support/testing/setup_and_teardown'
|
|
|
|
require 'active_support/testing/assertions'
|
|
|
|
require 'active_support/testing/deprecation'
|
|
|
|
require 'active_support/testing/declarative'
|
2009-02-02 14:49:32 -05:00
|
|
|
require 'active_support/testing/pending'
|
2009-06-30 15:00:50 -04:00
|
|
|
require 'active_support/testing/isolation'
|
2011-03-31 15:25:04 -04:00
|
|
|
require 'active_support/testing/mochaing'
|
2010-03-17 16:44:24 -04:00
|
|
|
require 'active_support/core_ext/kernel/reporting'
|
2008-11-23 17:48:36 -05:00
|
|
|
|
2008-11-22 22:18:30 -05:00
|
|
|
module ActiveSupport
|
|
|
|
class TestCase < ::Test::Unit::TestCase
|
|
|
|
if defined? MiniTest
|
2008-11-07 13:26:28 -05:00
|
|
|
Assertion = MiniTest::Assertion
|
2009-07-19 01:36:44 -04:00
|
|
|
alias_method :method_name, :name if method_defined? :name
|
|
|
|
alias_method :method_name, :__name__ if method_defined? :__name__
|
2008-11-22 22:18:30 -05:00
|
|
|
else
|
2008-11-07 13:26:28 -05:00
|
|
|
Assertion = Test::Unit::AssertionFailedError
|
2008-11-22 22:18:30 -05:00
|
|
|
|
2010-10-01 20:22:42 -04:00
|
|
|
undef :default_test
|
2008-11-22 22:18:30 -05:00
|
|
|
end
|
2008-11-07 12:45:48 -05:00
|
|
|
|
2009-05-20 19:52:56 -04:00
|
|
|
$tags = {}
|
|
|
|
def self.for_tag(tag)
|
|
|
|
yield if $tags[tag]
|
|
|
|
end
|
|
|
|
|
2008-11-07 12:45:48 -05:00
|
|
|
include ActiveSupport::Testing::SetupAndTeardown
|
|
|
|
include ActiveSupport::Testing::Assertions
|
2008-11-23 16:11:07 -05:00
|
|
|
include ActiveSupport::Testing::Deprecation
|
2009-02-02 14:49:32 -05:00
|
|
|
include ActiveSupport::Testing::Pending
|
2008-11-07 12:45:48 -05:00
|
|
|
extend ActiveSupport::Testing::Declarative
|
|
|
|
end
|
2008-11-22 22:18:30 -05:00
|
|
|
end
|