From 598fc201f9a023828d7e8777e24e0a66f01c7ff2 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 17 May 2012 13:17:17 -0700 Subject: [PATCH] Fix incorrect assert_block -> assert conversion. Assumed too much from the MiniTest deprecation message. --- actionpack/lib/action_controller/test_case.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 98f70f2336..028a8d3fba 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -93,13 +93,13 @@ module ActionController rendered = @templates msg = message || sprintf("expecting <%s> but rendering with <%s>", options.inspect, rendered.keys) - assert(msg) do + matches_template = if options rendered.any? { |t,num| t.match(options) } else @templates.blank? end - end + assert matches_template, msg when Hash if options.key?(:layout) expected_layout = options[:layout]