Skip to content
This repository

Fix tests to reflect IdentityMap no longer default #507

Merged
merged 1 commit into from almost 3 years ago

2 participants

dlee José Valim
dlee
dlee commented May 10, 2011

The tests probably broke in 0e1dcae

José Valim josevalim merged commit 4a6855e into from May 10, 2011
José Valim josevalim closed this May 10, 2011
José Valim josevalim merged commit 828f171 into from May 10, 2011
José Valim josevalim closed this May 10, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

May 10, 2011
dlee Fix tests to reflect IdentityMap no longer default
Broke in 0e1dcae
828f171
This page is out of date. Refresh to see the latest.
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
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.