Skip to content

Commit

Permalink
Fix rake test_sqlite3_mem
Browse files Browse the repository at this point in the history
  • Loading branch information
jonleighton committed Mar 4, 2012
1 parent 7ba0fe2 commit 223549f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions activerecord/test/cases/multiple_db_test.rb
Expand Up @@ -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.