Permalink
Browse files

Remove disconnect! in test case, it causes segfaults on sqlite3 and c…

…ompletely destroys postgresql

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8908 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 4eb1413 commit feac84521fd1c9356ed9f9086a600ca0d76d2e9e @NZKoz NZKoz committed Feb 20, 2008
Showing with 2 additions and 6 deletions.
  1. +2 −6 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 @@ def test_include_query
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

0 comments on commit feac845

Please sign in to comment.