Last active
August 29, 2015 14:16
-
-
Save holysugar/6b0acd989f11487020d1 to your computer and use it in GitHub Desktop.
test-unit を rails 4.2 で使う
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rails で test-unit を使う. 参考: | |
# * https://github.com/test-unit/test-unit-activesupport | |
# * https://github.com/rails/rails/blob/master/activesupport/lib/active_support/test_case.rb | |
# | |
require 'minitest' | |
def Minitest.autorun; end # remove Minitest at_exit process | |
require 'active_support/test_case' | |
require 'active_support/testing/tagged_logging' | |
require 'active_support/testing/assertions' | |
require 'active_support/testing/time_helpers' | |
require 'active_support/testing/isolation' | |
require 'test/unit' | |
module ActiveSupport | |
if const_defined?(:TestCase) | |
remove_const :TestCase | |
end | |
class TestCase < ::Test::Unit::TestCase | |
include ActiveSupport::Testing::TaggedLogging | |
include ActiveSupport::Testing::Assertions | |
include ActiveSupport::Testing::TimeHelpers | |
private | |
def mu_pp(object) | |
AssertionMessage.convert(object) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment