aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/fixtures_test.rb8
-rw-r--r--activerecord/test/cases/helper.rb17
-rw-r--r--activerecord/test/cases/validations_i18n_test.rb2
3 files changed, 11 insertions, 16 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb
index 6ba7597f56..ed2915b023 100644
--- a/activerecord/test/cases/fixtures_test.rb
+++ b/activerecord/test/cases/fixtures_test.rb
@@ -641,15 +641,15 @@ end
class FixtureLoadingTest < ActiveRecord::TestCase
uses_mocha 'reloading_fixtures_through_accessor_methods' do
def test_logs_message_for_failed_dependency_load
- Test::Unit::TestCase.expects(:require_dependency).with(:does_not_exist).raises(LoadError)
+ ActiveRecord::TestCase.expects(:require_dependency).with(:does_not_exist).raises(LoadError)
ActiveRecord::Base.logger.expects(:warn)
- Test::Unit::TestCase.try_to_load_dependency(:does_not_exist)
+ ActiveRecord::TestCase.try_to_load_dependency(:does_not_exist)
end
def test_does_not_logs_message_for_successful_dependency_load
- Test::Unit::TestCase.expects(:require_dependency).with(:works_out_fine)
+ ActiveRecord::TestCase.expects(:require_dependency).with(:works_out_fine)
ActiveRecord::Base.logger.expects(:warn).never
- Test::Unit::TestCase.try_to_load_dependency(:works_out_fine)
+ ActiveRecord::TestCase.try_to_load_dependency(:works_out_fine)
end
end
end
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb
index f7bdac8013..13988d5392 100644
--- a/activerecord/test/cases/helper.rb
+++ b/activerecord/test/cases/helper.rb
@@ -5,7 +5,6 @@ require 'config'
require 'test/unit'
require 'active_record'
-require 'active_record/fixtures'
require 'active_record/test_case'
require 'connection'
@@ -48,15 +47,11 @@ class << ActiveRecord::Base
end
unless ENV['FIXTURE_DEBUG']
- module Test #:nodoc:
- module Unit #:nodoc:
- class << TestCase #:nodoc:
- def try_to_load_dependency_with_silence(*args)
- ActiveRecord::Base.logger.silence { try_to_load_dependency_without_silence(*args)}
- end
-
- alias_method_chain :try_to_load_dependency, :silence
- end
+ module ActiveRecord::TestFixtures::ClassMethods
+ def try_to_load_dependency_with_silence(*args)
+ ActiveRecord::Base.logger.silence { try_to_load_dependency_without_silence(*args)}
end
+
+ alias_method_chain :try_to_load_dependency, :silence
end
-end \ No newline at end of file
+end
diff --git a/activerecord/test/cases/validations_i18n_test.rb b/activerecord/test/cases/validations_i18n_test.rb
index 42246f18b6..b2df98ca0a 100644
--- a/activerecord/test/cases/validations_i18n_test.rb
+++ b/activerecord/test/cases/validations_i18n_test.rb
@@ -2,7 +2,7 @@ require "cases/helper"
require 'models/topic'
require 'models/reply'
-class ActiveRecordValidationsI18nTests < Test::Unit::TestCase
+class ActiveRecordValidationsI18nTests < ActiveSupport::TestCase
def setup
reset_callbacks Topic
@topic = Topic.new