diff options
author | Jeffrey Hardy <packagethief@gmail.com> | 2008-08-05 16:29:56 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-08-05 16:29:56 -0500 |
commit | 8d72b82b8da99eda9ba654b3d3a4da847a212406 (patch) | |
tree | 0f4a49a58826a218bc92208aa8f48f8d7bc36f9d /actionpack/lib | |
parent | dc66469e6464bbb6d7bd6f242731395b6574aca2 (diff) | |
download | rails-8d72b82b8da99eda9ba654b3d3a4da847a212406.tar.gz rails-8d72b82b8da99eda9ba654b3d3a4da847a212406.tar.bz2 rails-8d72b82b8da99eda9ba654b3d3a4da847a212406.zip |
Make assert_template failure message more friendly
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/assertions/response_assertions.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/assertions/response_assertions.rb b/actionpack/lib/action_controller/assertions/response_assertions.rb index 765225ae24..e2e8bbdc71 100644 --- a/actionpack/lib/action_controller/assertions/response_assertions.rb +++ b/actionpack/lib/action_controller/assertions/response_assertions.rb @@ -87,11 +87,11 @@ module ActionController # def assert_template(expected = nil, message=nil) clean_backtrace do - rendered = @response.rendered_template + rendered = @response.rendered_template.to_s msg = build_message(message, "expecting <?> but rendering with <?>", expected, rendered) assert_block(msg) do if expected.nil? - @response.rendered_template.nil? + @response.rendered_template.blank? else rendered.to_s.match(expected) end |