From ccb335da1f293dc745be0171ce3d95e50223d934 Mon Sep 17 00:00:00 2001 From: Marcin Raczkowski Date: Sun, 29 Aug 2010 12:04:43 +0200 Subject: IdentityMap - Adjustments to test cases --- .../test/cases/associations/eager_load_includes_full_sti_class_test.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb') diff --git a/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb b/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb index fb59f63f91..fae4029bbc 100644 --- a/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb +++ b/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb @@ -27,6 +27,8 @@ class EagerLoadIncludeFullStiClassNamesTest < ActiveRecord::TestCase post = Namespaced::Post.find_by_title( 'Great stuff', :include => :tagging ) assert_nil post.tagging + ActiveRecord::IdentityMap.clear # we need to clear IM to reload post. + ActiveRecord::Base.store_full_sti_class = true post = Namespaced::Post.find_by_title( 'Great stuff', :include => :tagging ) assert_instance_of Tagging, post.tagging -- cgit v1.2.3 From 93daf1b80984eab80f0da13c2b42ae76b63085e3 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Wed, 20 Oct 2010 16:11:59 -0300 Subject: Revert "IdentityMap - Adjustments to test cases" This reverts commit 4db9dca55e3acc2c59f252eb83ecb83db5f4b81b. Conflicts: activerecord/test/cases/identity_map_test.rb --- .../test/cases/associations/eager_load_includes_full_sti_class_test.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb') diff --git a/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb b/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb index fae4029bbc..fb59f63f91 100644 --- a/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb +++ b/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb @@ -27,8 +27,6 @@ class EagerLoadIncludeFullStiClassNamesTest < ActiveRecord::TestCase post = Namespaced::Post.find_by_title( 'Great stuff', :include => :tagging ) assert_nil post.tagging - ActiveRecord::IdentityMap.clear # we need to clear IM to reload post. - ActiveRecord::Base.store_full_sti_class = true post = Namespaced::Post.find_by_title( 'Great stuff', :include => :tagging ) assert_instance_of Tagging, post.tagging -- cgit v1.2.3 From 4a0a1605cdee91bb8c9d3c1cb5989efa550a3816 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Wed, 20 Oct 2010 19:00:25 -0300 Subject: Clear IdentityMap before continue this test, we can do this here because store_full_sti_class is not supposed to change during "runtime". --- .../test/cases/associations/eager_load_includes_full_sti_class_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb') diff --git a/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb b/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb index fb59f63f91..d75791cab9 100644 --- a/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb +++ b/activerecord/test/cases/associations/eager_load_includes_full_sti_class_test.rb @@ -27,6 +27,7 @@ class EagerLoadIncludeFullStiClassNamesTest < ActiveRecord::TestCase post = Namespaced::Post.find_by_title( 'Great stuff', :include => :tagging ) assert_nil post.tagging + ActiveRecord::IdentityMap.clear ActiveRecord::Base.store_full_sti_class = true post = Namespaced::Post.find_by_title( 'Great stuff', :include => :tagging ) assert_instance_of Tagging, post.tagging -- cgit v1.2.3