Permalink
Browse files

Merge pull request #507 from dlee/fix_identity_map_tests

Fix tests to reflect IdentityMap no longer default
  • Loading branch information...
josevalim committed May 11, 2011
2 parents a792ad6 + 828f171 commit 4a6855e183707704038905b4e27cf33808bc5292
@@ -166,7 +166,7 @@ def from_bar_helper
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
@@ -30,7 +30,6 @@ def app
"Rack::Sendfile",
"ActionDispatch::Reloader",
"ActionDispatch::Callbacks",
- "ActiveRecord::IdentityMap::Middleware",
"ActiveRecord::ConnectionAdapters::ConnectionManagement",
"ActiveRecord::QueryCache",
"ActionDispatch::Cookies",
@@ -121,6 +120,7 @@ def app
end
test "identity map is inserted" do
+ add_to_config "config.active_record.identity_map = true"
boot!
assert middleware.include?("ActiveRecord::IdentityMap::Middleware")
end

0 comments on commit 4a6855e

Please sign in to comment.