aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-10-10 09:11:56 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-10-10 09:11:56 -0700
commit51278579477eb7ee20fe2aba53b4b13203791b22 (patch)
tree73b6a18ceff1457ded12044b2611aa55d0447817 /activerecord/test/cases
parent64e64c6f041224fefc03bbfdd2dd86d494df1990 (diff)
parent336783ad96dbcc3f84a11069e004ea1268b051f4 (diff)
downloadrails-51278579477eb7ee20fe2aba53b4b13203791b22.tar.gz
rails-51278579477eb7ee20fe2aba53b4b13203791b22.tar.bz2
rails-51278579477eb7ee20fe2aba53b4b13203791b22.zip
Merge pull request #17014 from grosser/grosser/fast-fixtures
speed up fixtures by not loading all their classes
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/fixtures_test.rb19
-rw-r--r--activerecord/test/cases/helper.rb13
2 files changed, 0 insertions, 32 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb
index 1050047a43..7141d3ee7f 100644
--- a/activerecord/test/cases/fixtures_test.rb
+++ b/activerecord/test/cases/fixtures_test.rb
@@ -822,25 +822,6 @@ class ActiveSupportSubclassWithFixturesTest < ActiveRecord::TestCase
end
end
-class FixtureLoadingTest < ActiveRecord::TestCase
- def test_logs_message_for_failed_dependency_load
- ActiveRecord::Base.logger.expects(:warn).twice
- ActiveRecord::TestCase.try_to_load_dependency('does_not_exist')
- end
-
- def test_does_not_logs_message_for_dependency_that_has_been_defined_with_set_fixture_class
- ActiveRecord::TestCase.set_fixture_class unknown_dead_parrots: DeadParrot
- ActiveRecord::Base.logger.expects(:warn).never
- ActiveRecord::TestCase.try_to_load_dependency('unknown_dead_parrot')
- end
-
- def test_does_not_logs_message_for_successful_dependency_load
- ActiveRecord::TestCase.expects(:require_dependency).with('works_out_fine')
- ActiveRecord::Base.logger.expects(:warn).never
- ActiveRecord::TestCase.try_to_load_dependency('works_out_fine')
- end
-end
-
class CustomNameForFixtureOrModelTest < ActiveRecord::TestCase
ActiveRecord::FixtureSet.reset_cache
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb
index be635aeef9..f5be8a044b 100644
--- a/activerecord/test/cases/helper.rb
+++ b/activerecord/test/cases/helper.rb
@@ -136,19 +136,6 @@ def disable_extension!(extension, connection)
connection.reconnect!
end
-unless ENV['FIXTURE_DEBUG']
- module ActiveRecord::TestFixtures::ClassMethods
- def try_to_load_dependency_with_silence(*args)
- old = ActiveRecord::Base.logger.level
- ActiveRecord::Base.logger.level = ActiveSupport::Logger::ERROR
- try_to_load_dependency_without_silence(*args)
- ActiveRecord::Base.logger.level = old
- end
-
- alias_method_chain :try_to_load_dependency, :silence
- end
-end
-
require "cases/validations_repair_helper"
class ActiveSupport::TestCase
include ActiveRecord::TestFixtures