aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-09-15 11:09:30 -0300
committerEmilio Tagua <miloops@gmail.com>2010-11-19 19:07:43 -0300
commita9edd6cf932b299e28677cb1e0af397c533caffe (patch)
tree1f29c92e9cddb69b9f55f9cf0a7c0d7f0ea87c42
parentf1913ad835abce53b5365c11c9d13975c1d8ba46 (diff)
downloadrails-a9edd6cf932b299e28677cb1e0af397c533caffe.tar.gz
rails-a9edd6cf932b299e28677cb1e0af397c533caffe.tar.bz2
rails-a9edd6cf932b299e28677cb1e0af397c533caffe.zip
Add test to show that when IdentityMap is disabled finders returns different objects.
-rw-r--r--activerecord/test/cases/identity_map_test.rb11
1 files 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