Skip to content
Browse files

Small tweak to e0fef66

  • Loading branch information...
1 parent e0fef66 commit 26bc867151a8f302b4c6122e6375c3ea2088a037 @josh josh committed Jul 13, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_controller/assertions/response_assertions.rb
View
6 actionpack/lib/action_controller/assertions/response_assertions.rb
@@ -87,13 +87,13 @@ def assert_redirected_to(options = {}, message=nil)
#
def assert_template(expected = nil, message=nil)
clean_backtrace do
- rendered = @response.rendered_template.to_s
+ rendered = @response.rendered_template
msg = build_message(message, "expecting <?> but rendering with <?>", expected, rendered)
assert_block(msg) do
if expected.nil?
- @response.rendered_template ? true : false
+ @response.rendered_template.nil?
else
- rendered.match(expected)
+ rendered.to_s.match(expected)
end
end
end

0 comments on commit 26bc867

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