mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
41f3b7ab56
commit
a72ace1596
1 changed files with 2 additions and 2 deletions
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue