Created
May 24, 2010 18:22
-
-
Save mackato/412229 to your computer and use it in GitHub Desktop.
Fix controller spec errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/te | |
index 34499fa..aed493a 100644 | |
--- a/actionpack/lib/action_controller/test_case.rb | |
+++ b/actionpack/lib/action_controller/test_case.rb | |
@@ -18,6 +18,7 @@ module ActionController | |
ActiveSupport::Notifications.subscribe("render_template.action_view") do |name, start, fi | |
path = payload[:layout] | |
+ @layouts ||= Hash.new(0) | |
@layouts[path] += 1 | |
end | |
@@ -30,6 +31,7 @@ module ActionController | |
@partials[path.split("/").last] += 1 | |
@templates[path] += 1 | |
else | |
+ @templates ||= Hash.new(0) | |
@templates[path] += 1 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment