1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #507 from dlee/fix_identity_map_tests

Fix tests to reflect IdentityMap no longer default
This commit is contained in:
José Valim 2011-05-10 23:30:53 -07:00
commit 4a6855e183
2 changed files with 2 additions and 2 deletions

View file

@ -166,7 +166,7 @@ module ApplicationTests
require "#{app_path}/config/environment"
expects = [ActiveRecord::IdentityMap::Middleware, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActiveRecord::SessionStore]
expects = [ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActiveRecord::SessionStore]
middleware = Rails.application.config.middleware.map { |m| m.klass }
assert_equal expects, middleware & expects
end

View file

@ -30,7 +30,6 @@ module ApplicationTests
"Rack::Sendfile",
"ActionDispatch::Reloader",
"ActionDispatch::Callbacks",
"ActiveRecord::IdentityMap::Middleware",
"ActiveRecord::ConnectionAdapters::ConnectionManagement",
"ActiveRecord::QueryCache",
"ActionDispatch::Cookies",
@ -121,6 +120,7 @@ module ApplicationTests
end
test "identity map is inserted" do
add_to_config "config.active_record.identity_map = true"
boot!
assert middleware.include?("ActiveRecord::IdentityMap::Middleware")
end