From feac84521fd1c9356ed9f9086a600ca0d76d2e9e Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Wed, 20 Feb 2008 01:24:31 +0000 Subject: Remove disconnect! in test case, it causes segfaults on sqlite3 and completely destroys postgresql git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8908 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../test/cases/associations/eager_load_nested_include_test.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'activerecord/test/cases/associations') diff --git a/activerecord/test/cases/associations/eager_load_nested_include_test.rb b/activerecord/test/cases/associations/eager_load_nested_include_test.rb index 110a0c7630..ac3f997fa5 100644 --- a/activerecord/test/cases/associations/eager_load_nested_include_test.rb +++ b/activerecord/test/cases/associations/eager_load_nested_include_test.rb @@ -1,6 +1,6 @@ require 'cases/helper' -class EagerLoadPolyAssocsTest < Test::Unit::TestCase +class EagerLoadPolyAssocsTest < ActiveRecord::TestCase NUM_SIMPLE_OBJS = 50 NUM_SHAPE_EXPRESSIONS = 100 @@ -70,16 +70,12 @@ class EagerLoadPolyAssocsTest < Test::Unit::TestCase res = 0 res = ShapeExpression.find :all, :include => [ :shape, { :paint => :non_poly } ] assert_equal NUM_SHAPE_EXPRESSIONS, res.size - ShapeExpression.connection.disconnect! - assert_nothing_raised "confirm we can access associations in memory" do + assert_queries(0) do res.each do |se| assert_not_nil se.paint.non_poly, "this is the association that was loading incorrectly before the change" assert_not_nil se.shape, "just making sure other associations still work" end end - assert_raise ActiveRecord::StatementInvalid, "An exception should be raised when db connectivity is required" do - res[0].reload - end end end -- cgit v1.2.3