diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-10-20 19:13:18 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-11-19 19:08:57 -0300 |
commit | 7892543a88e5ec2329e3834a591a7b3b80d165f0 (patch) | |
tree | 05d2de64ca94f8bc0d0a924d4ac8e2b91e44518e /activerecord/test/cases | |
parent | 5ee3663101f224a30ec95f6dab4b02a4a922eb2f (diff) | |
download | rails-7892543a88e5ec2329e3834a591a7b3b80d165f0.tar.gz rails-7892543a88e5ec2329e3834a591a7b3b80d165f0.tar.bz2 rails-7892543a88e5ec2329e3834a591a7b3b80d165f0.zip |
Don't change tests, fix code: if locking is enabled skip IM.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/locking_test.rb | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/activerecord/test/cases/locking_test.rb b/activerecord/test/cases/locking_test.rb index 5ceb19e7c8..4ddcdc010b 100644 --- a/activerecord/test/cases/locking_test.rb +++ b/activerecord/test/cases/locking_test.rb @@ -15,11 +15,6 @@ class ReadonlyFirstNamePerson < Person attr_readonly :first_name end -# Becouse of introduction of IdentityMap optimistic locking should only be needed -# in multithreaded applications, or when more then one software operates on database. -# -# I'm using ActiveRecord::IdentityMap.without to prevent Identity map from -# using one record here. class OptimisticLockingTest < ActiveRecord::TestCase fixtures :people, :legacy_things, :references @@ -28,10 +23,6 @@ class OptimisticLockingTest < ActiveRecord::TestCase # of a test (see test_increment_counter_*). self.use_transactional_fixtures = false - def setup - ActiveRecord::IdentityMap.enabled = false - end - def test_lock_existing p1 = Person.find(1) p2 = Person.find(1) @@ -224,10 +215,6 @@ class OptimisticLockingTest < ActiveRecord::TestCase end end - def teardown - ActiveRecord::IdentityMap.enabled = true - end - private def add_counter_column_to(model, col='test_count') |