Skip to content
This repository
Browse code

Merge pull request #507 from dlee/fix_identity_map_tests

Fix tests to reflect IdentityMap no longer default
  • Loading branch information...
commit 4a6855e183707704038905b4e27cf33808bc5292 2 parents a792ad6 + 828f171
José Valim authored May 10, 2011
2  railties/test/application/initializers/frameworks_test.rb
@@ -166,7 +166,7 @@ def from_bar_helper
166 166
 
167 167
       require "#{app_path}/config/environment"
168 168
 
169  
-      expects = [ActiveRecord::IdentityMap::Middleware, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActiveRecord::SessionStore]
  169
+      expects = [ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActiveRecord::SessionStore]
170 170
       middleware = Rails.application.config.middleware.map { |m| m.klass }
171 171
       assert_equal expects, middleware & expects
172 172
     end
2  railties/test/application/middleware_test.rb
@@ -30,7 +30,6 @@ def app
30 30
         "Rack::Sendfile",
31 31
         "ActionDispatch::Reloader",
32 32
         "ActionDispatch::Callbacks",
33  
-        "ActiveRecord::IdentityMap::Middleware",
34 33
         "ActiveRecord::ConnectionAdapters::ConnectionManagement",
35 34
         "ActiveRecord::QueryCache",
36 35
         "ActionDispatch::Cookies",
@@ -121,6 +120,7 @@ def app
121 120
     end
122 121
 
123 122
     test "identity map is inserted" do
  123
+      add_to_config "config.active_record.identity_map = true"
124 124
       boot!
125 125
       assert middleware.include?("ActiveRecord::IdentityMap::Middleware")
126 126
     end

0 notes on commit 4a6855e

Please sign in to comment.
Something went wrong with that request. Please try again.