aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-07-13 14:00:40 -0500
committerJoshua Peek <josh@joshpeek.com>2008-07-13 14:00:40 -0500
commit26bc867151a8f302b4c6122e6375c3ea2088a037 (patch)
tree5b4e17a35ef4bb1688aa9c58858c6c0d17cdfa35 /actionpack
parente0fef66149092dd3d2988fff64f0ce8765735687 (diff)
downloadrails-26bc867151a8f302b4c6122e6375c3ea2088a037.tar.gz
rails-26bc867151a8f302b4c6122e6375c3ea2088a037.tar.bz2
rails-26bc867151a8f302b4c6122e6375c3ea2088a037.zip
Small tweak to e0fef66
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/assertions/response_assertions.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/assertions/response_assertions.rb b/actionpack/lib/action_controller/assertions/response_assertions.rb
index a98c70d66f..765225ae24 100644
--- a/actionpack/lib/action_controller/assertions/response_assertions.rb
+++ b/actionpack/lib/action_controller/assertions/response_assertions.rb
@@ -87,13 +87,13 @@ module ActionController
#
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