diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-02-20 01:24:31 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-02-20 01:24:31 +0000 |
commit | feac84521fd1c9356ed9f9086a600ca0d76d2e9e (patch) | |
tree | cab25b18fadb9f18876839732582ede262f00b30 /activerecord | |
parent | 4eb1413e3ba603608ba27d55fa0d1aa18f7e0223 (diff) | |
download | rails-feac84521fd1c9356ed9f9086a600ca0d76d2e9e.tar.gz rails-feac84521fd1c9356ed9f9086a600ca0d76d2e9e.tar.bz2 rails-feac84521fd1c9356ed9f9086a600ca0d76d2e9e.zip |
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
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/associations/eager_load_nested_include_test.rb | 8 |
1 files changed, 2 insertions, 6 deletions
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 |