diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-06-10 13:52:22 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-06-15 14:58:38 +0200 |
commit | 6d10d64cbafe70e343cef0f94e015908b9348ac5 (patch) | |
tree | ba2fda07a5f8508178f8fad2f1f38c10909dce37 /activerecord/lib/active_record | |
parent | be4fac3c0ce80b8a739bba21dba6ac6c1eca9987 (diff) | |
download | rails-6d10d64cbafe70e343cef0f94e015908b9348ac5.tar.gz rails-6d10d64cbafe70e343cef0f94e015908b9348ac5.tar.bz2 rails-6d10d64cbafe70e343cef0f94e015908b9348ac5.zip |
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.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 4 |
1 files changed, 0 insertions, 4 deletions
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| |