Permalink
Browse files

Fix rake test_sqlite3_mem

  • Loading branch information...
1 parent 7ba0fe2 commit 223549f420583e8cfaa280542da679d6c6045b44 @jonleighton jonleighton committed Mar 4, 2012
Showing with 9 additions and 7 deletions.
  1. +9 −7 activerecord/test/cases/multiple_db_test.rb
@@ -89,14 +89,16 @@ def test_arel_table_engines
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

0 comments on commit 223549f

Please sign in to comment.