diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-07-10 19:31:44 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-07-10 19:31:44 +0000 |
commit | a72ace1596c5be23cf6f3dee29232d8529053eb1 (patch) | |
tree | 464cc1d491f8f06eaf5c25c0f04d5b378755b726 /activerecord | |
parent | 41f3b7ab56d1c90454c0c5db6cbf3e8982ac0f34 (diff) | |
download | rails-a72ace1596c5be23cf6f3dee29232d8529053eb1.tar.gz rails-a72ace1596c5be23cf6f3dee29232d8529053eb1.tar.bz2 rails-a72ace1596c5be23cf6f3dee29232d8529053eb1.zip |
Ignore fixtures in test cases if there are no database configurations. References #5497.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4603 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 51202b3f92..af222e38e4 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -505,7 +505,7 @@ module Test #:nodoc: end def setup_with_fixtures - return unless defined?(ActiveRecord::Base) + return unless defined?(ActiveRecord::Base) && !ActiveRecord::Base.configurations.blank? if pre_loaded_fixtures && !use_transactional_fixtures raise RuntimeError, 'pre_loaded_fixtures requires use_transactional_fixtures' @@ -537,7 +537,7 @@ module Test #:nodoc: alias_method :setup, :setup_with_fixtures def teardown_with_fixtures - return unless defined?(ActiveRecord::Base) + return unless defined?(ActiveRecord::Base) && !ActiveRecord::Base.configurations.blank? # Rollback changes. if use_transactional_fixtures? |