From 623f2fbb933994bb81187c18984ae51047d9b029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Sun, 30 Sep 2012 00:21:51 -0300 Subject: [PATCH] Whitespaces :scissors: [ci skip] --- actionpack/CHANGELOG.md | 23 +++++++++++-------- actionpack/lib/action_controller/test_case.rb | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 0849370db782d..4306447272a02 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,20 +1,23 @@ ## Rails 4.0.0 (unreleased) ## -* `assert_template` no more passing with what ever string that matches. - - Given Im rendering an template `/layout/hello.html.erb`, assert_template was - passing with any string that matches. This behavior allowed false passing like: +* `assert_template` is no more passing with what ever string that matches + with the template name. - assert_template "layout" - assert_template "out/hello" + Before when we have a template `/layout/hello.html.erb`, `assert_template` + was passing with any string that matches. This behavior allowed false + positive like: - Now the passing possibilities are: + assert_template "layout" + assert_template "out/hello" - assert_template "layout/hello" - assert_template "hello" + Now it only passes with: - *Hugolnx* + assert_template "layout/hello" + assert_template "hello" + + Fixes #3849. + *Hugolnx* * `image_tag` will set the same width and height for image if numerical value passed to `size` option. diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 34974f5149391..20c6e2bf53d72 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -91,7 +91,7 @@ def assert_template(options = {}, message = nil) rendered = @templates msg = message || sprintf("expecting <%s> but rendering with <%s>", options.inspect, rendered.keys) - matches_template = + matches_template = case options when String rendered.any? do |t, num|