Skip to content
Browse files

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
  • Loading branch information...
1 parent 41f3b7a commit a72ace1596c5be23cf6f3dee29232d8529053eb1 @jeremy jeremy committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/fixtures.rb
View
4 activerecord/lib/active_record/fixtures.rb
@@ -505,7 +505,7 @@ def use_transactional_fixtures?
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 @@ def setup_with_fixtures
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?

0 comments on commit a72ace1

Please sign in to comment.
Something went wrong with that request. Please try again.