diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-28 23:51:50 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-28 23:51:50 +0000 |
commit | ce458a74a5f95bb09c4e6b6dbd62367d767af18e (patch) | |
tree | 40d4afe7a37428c17b24690dcc4795c05b5c6d76 /activerecord/lib | |
parent | 0e146d54a7b31d571fe3b5d2e62085a432d7e52c (diff) | |
download | rails-ce458a74a5f95bb09c4e6b6dbd62367d767af18e.tar.gz rails-ce458a74a5f95bb09c4e6b6dbd62367d767af18e.tar.bz2 rails-ce458a74a5f95bb09c4e6b6dbd62367d767af18e.zip |
Don't assume Active Record is available. Closes #5497.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 3180d91c46..66cf3f237b 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -505,6 +505,7 @@ module Test #:nodoc: end def setup_with_fixtures + return if !defined?(ActiveRecord::Base) || ActiveRecord::Base.configurations.blank? if pre_loaded_fixtures && !use_transactional_fixtures raise RuntimeError, 'pre_loaded_fixtures requires use_transactional_fixtures' end @@ -535,6 +536,7 @@ module Test #:nodoc: alias_method :setup, :setup_with_fixtures def teardown_with_fixtures + return if !defined?(ActiveRecord::Base) || ActiveRecord::Base.configurations.blank? # Rollback changes. if use_transactional_fixtures? ActiveRecord::Base.connection.rollback_db_transaction |