Skip to content
Browse files

Fix incorrect assert_block -> assert conversion. Assumed too much fro…

…m the MiniTest deprecation message.
  • Loading branch information...
1 parent 0f5cc34 commit 598fc201f9a023828d7e8777e24e0a66f01c7ff2 @jeremy jeremy committed May 17, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_controller/test_case.rb
View
4 actionpack/lib/action_controller/test_case.rb
@@ -93,13 +93,13 @@ def assert_template(options = {}, message = nil)
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]

0 comments on commit 598fc20

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