From 87aa9133c43668ab79e6fb31a872ea309e3811e2 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Thu, 14 Oct 2010 16:21:28 -0300 Subject: Flush IdentityMap when running tests. --- railties/lib/rails/test_help.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb index 38f2f651f4..1057d87ff4 100644 --- a/railties/lib/rails/test_help.rb +++ b/railties/lib/rails/test_help.rb @@ -19,6 +19,10 @@ if defined?(ActiveRecord) class ActiveSupport::TestCase include ActiveRecord::TestFixtures self.fixture_path = "#{Rails.root}/test/fixtures/" + + setup do + ActiveRecord::IdentityMap.clear + end end ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path -- cgit v1.2.3