diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-29 01:13:55 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-29 01:13:55 +0000 |
commit | 5b866f75a7ba5970a51a91cf643d03cc89f5c4c3 (patch) | |
tree | 78756dde47a54c35d494ee679abfdb34e4ce527f /activerecord/lib | |
parent | 141962348c74239874d85990ba0d9c3d5d73d9c6 (diff) | |
download | rails-5b866f75a7ba5970a51a91cf643d03cc89f5c4c3.tar.gz rails-5b866f75a7ba5970a51a91cf643d03cc89f5c4c3.tar.bz2 rails-5b866f75a7ba5970a51a91cf643d03cc89f5c4c3.zip |
r4720@asus: jeremy | 2006-06-28 18:12:57 -0700
Don't be such a hardass. References #5497.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4508 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 66cf3f237b..51202b3f92 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -505,7 +505,8 @@ module Test #:nodoc: end def setup_with_fixtures - return if !defined?(ActiveRecord::Base) || ActiveRecord::Base.configurations.blank? + return unless defined?(ActiveRecord::Base) + if pre_loaded_fixtures && !use_transactional_fixtures raise RuntimeError, 'pre_loaded_fixtures requires use_transactional_fixtures' end @@ -536,7 +537,8 @@ module Test #:nodoc: alias_method :setup, :setup_with_fixtures def teardown_with_fixtures - return if !defined?(ActiveRecord::Base) || ActiveRecord::Base.configurations.blank? + return unless defined?(ActiveRecord::Base) + # Rollback changes. if use_transactional_fixtures? ActiveRecord::Base.connection.rollback_db_transaction |