diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-10-14 15:39:57 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-11-19 19:08:42 -0300 |
commit | f3722a30b63f45add2e6e03c4e7498b46628b60b (patch) | |
tree | d0bb7dcaf9625ec0bcc801592f2cf1af827d9aa0 /railties/test | |
parent | 4da31d21bc0fe10fc329eb6d89ba52b27f8ed25e (diff) | |
download | rails-f3722a30b63f45add2e6e03c4e7498b46628b60b.tar.gz rails-f3722a30b63f45add2e6e03c4e7498b46628b60b.tar.bz2 rails-f3722a30b63f45add2e6e03c4e7498b46628b60b.zip |
Use IdentityMap middleware to flush map on each request.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/initializers/frameworks_test.rb | 2 | ||||
-rw-r--r-- | railties/test/application/middleware_test.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index 475091f789..9a340e6484 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -166,7 +166,7 @@ module ApplicationTests require "#{app_path}/config/environment" - expects = [ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActiveRecord::SessionStore] + expects = [ActiveRecord::IdentityMap::Middleware, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActiveRecord::SessionStore] middleware = Rails.application.config.middleware.map { |m| m.klass } assert_equal expects, middleware & expects end diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index 173ac40b12..9820a92918 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -28,6 +28,7 @@ module ApplicationTests "ActionDispatch::RemoteIp", "Rack::Sendfile", "ActionDispatch::Callbacks", + "ActiveRecord::IdentityMap::Middleware", "ActiveRecord::ConnectionAdapters::ConnectionManagement", "ActiveRecord::QueryCache", "ActionDispatch::Cookies", @@ -55,6 +56,7 @@ module ApplicationTests boot! assert !middleware.include?("ActiveRecord::ConnectionAdapters::ConnectionManagement") assert !middleware.include?("ActiveRecord::QueryCache") + assert !middleware.include?("ActiveRecord::IdentityMap::Middleware") end test "removes lock if allow concurrency is set" do |