aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-03-04 12:15:11 +0000
committerJon Leighton <j@jonathanleighton.com>2012-03-04 12:15:11 +0000
commit223549f420583e8cfaa280542da679d6c6045b44 (patch)
tree69c6c4d8a096c24dac5be4e13bb2374bebfd9650 /activerecord/test
parent7ba0fe21729794e4023bdb182a9ff562231be0c9 (diff)
downloadrails-223549f420583e8cfaa280542da679d6c6045b44.tar.gz
rails-223549f420583e8cfaa280542da679d6c6045b44.tar.bz2
rails-223549f420583e8cfaa280542da679d6c6045b44.zip
Fix rake test_sqlite3_mem
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/multiple_db_test.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/activerecord/test/cases/multiple_db_test.rb b/activerecord/test/cases/multiple_db_test.rb
index a802cfbf31..917a03bb34 100644
--- a/activerecord/test/cases/multiple_db_test.rb
+++ b/activerecord/test/cases/multiple_db_test.rb
@@ -89,14 +89,16 @@ class MultipleDbTest < ActiveRecord::TestCase
assert_equal Entrant.arel_engine, Bird.arel_engine
end
- def test_associations_should_work_when_model_has_no_connection
- begin
- ActiveRecord::Model.remove_connection
- assert_nothing_raised ActiveRecord::ConnectionNotEstablished do
- College.first.courses.first
+ unless in_memory_db?
+ def test_associations_should_work_when_model_has_no_connection
+ begin
+ ActiveRecord::Model.remove_connection
+ assert_nothing_raised ActiveRecord::ConnectionNotEstablished do
+ College.first.courses.first
+ end
+ ensure
+ ActiveRecord::Model.establish_connection 'arunit'
end
- ensure
- ActiveRecord::Model.establish_connection 'arunit'
end
end
end