aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r--actionpack/lib/action_controller/test_case.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 2b9b34961e..2010d8573c 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -16,12 +16,12 @@ module ActionController
@templates = Hash.new(0)
@layouts = Hash.new(0)
- ActiveSupport::Notifications.subscribe("action_view.render_template") do |name, start, finish, id, payload|
+ ActiveSupport::Notifications.subscribe("render_template.action_view") do |name, start, finish, id, payload|
path = payload[:layout]
@layouts[path] += 1
end
- ActiveSupport::Notifications.subscribe("action_view.render_template!") do |name, start, finish, id, payload|
+ ActiveSupport::Notifications.subscribe("!render_template.action_view") do |name, start, finish, id, payload|
path = payload[:virtual_path]
next unless path
partial = path =~ /^.*\/_[^\/]*$/
@@ -36,8 +36,8 @@ module ActionController
end
def teardown_subscriptions
- ActiveSupport::Notifications.unsubscribe("action_view.render_template")
- ActiveSupport::Notifications.unsubscribe("action_view.render_template!")
+ ActiveSupport::Notifications.unsubscribe("render_template.action_view")
+ ActiveSupport::Notifications.unsubscribe("!render_template.action_view")
end
# Asserts that the request was rendered with the appropriate template file or partials