diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/test_case.rb | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/activerecord/test/cases/test_case.rb b/activerecord/test/cases/test_case.rb index 80aaead6d9..23a170388e 100644 --- a/activerecord/test/cases/test_case.rb +++ b/activerecord/test/cases/test_case.rb @@ -1,9 +1,18 @@ require 'active_support/test_case' module ActiveRecord - # The +capture+ helper was deprecated because it is not thread safe. - # Our own tests still depend on it. - module UndeprecateCapture + # = Active Record Test Case + # + # Defines some test assertions to test against SQL queries. + class TestCase < ActiveSupport::TestCase #:nodoc: + def teardown + SQLCounter.clear_log + end + + def assert_date_from_db(expected, actual, message = nil) + assert_equal expected.to_s, actual.to_s, message + end + def capture(stream) stream = stream.to_s captured_stream = Tempfile.new(stream) @@ -20,21 +29,6 @@ module ActiveRecord captured_stream.unlink stream_io.reopen(origin_stream) end - end - - # = Active Record Test Case - # - # Defines some test assertions to test against SQL queries. - class TestCase < ActiveSupport::TestCase #:nodoc: - include UndeprecateCapture - - def teardown - SQLCounter.clear_log - end - - def assert_date_from_db(expected, actual, message = nil) - assert_equal expected.to_s, actual.to_s, message - end def capture_sql SQLCounter.clear_log |