From a9edd6cf932b299e28677cb1e0af397c533caffe Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Wed, 15 Sep 2010 11:09:30 -0300 Subject: Add test to show that when IdentityMap is disabled finders returns different objects. --- activerecord/test/cases/identity_map_test.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/activerecord/test/cases/identity_map_test.rb b/activerecord/test/cases/identity_map_test.rb index df43d8c4f4..c51bdf5f69 100644 --- a/activerecord/test/cases/identity_map_test.rb +++ b/activerecord/test/cases/identity_map_test.rb @@ -26,10 +26,13 @@ class IdentityMapTest < ActiveRecord::TestCase :posts, :tags, :taggings, :comments, :subscribers def test_find_id - assert_same( - Client.find(3), - Client.find(3) - ) + assert_same(Client.find(3), Client.find(3)) + end + + def test_find_id_without_identity_map + IdentityMap.without do + assert_not_same(Client.find(3), Client.find(3)) + end end def test_find_pkey -- cgit v1.2.3