From 6d10d64cbafe70e343cef0f94e015908b9348ac5 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 10 Jun 2013 13:52:22 +0200 Subject: fixture setup does not rely on `AR::Base.configurations`. As you can also configure your database connection using `ENV["DATABASE_URL"]`, the fixture setup can't reply on the `.configurations` Hash. As the fixtures are only loaded when ActiveRecord is actually used (`rails/test_help.rb`) it should be safe to drop the check for an existing configuration. --- activerecord/lib/active_record/fixtures.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 33e19313a0..70eda332b3 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -841,8 +841,6 @@ module ActiveRecord end def setup_fixtures - return if ActiveRecord::Base.configurations.blank? - if pre_loaded_fixtures && !use_transactional_fixtures raise RuntimeError, 'pre_loaded_fixtures requires use_transactional_fixtures' end @@ -875,8 +873,6 @@ module ActiveRecord end def teardown_fixtures - return if ActiveRecord::Base.configurations.blank? - # Rollback changes if a transaction is active. if run_in_transaction? @fixture_connections.each do |connection| -- cgit v1.2.3