Skip to content

Commit

Permalink
Whitespaces ✂️ [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Sep 30, 2012
1 parent d0d02bf commit 623f2fb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions actionpack/CHANGELOG.md
@@ -1,20 +1,23 @@
## Rails 4.0.0 (unreleased) ## ## Rails 4.0.0 (unreleased) ##


* `assert_template` no more passing with what ever string that matches. * `assert_template` is no more passing with what ever string that matches

with the template name.
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 "layout" Before when we have a template `/layout/hello.html.erb`, `assert_template`
assert_template "out/hello" 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" Now it only passes with:
assert_template "hello"


*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 * `image_tag` will set the same width and height for image if numerical value
passed to `size` option. passed to `size` option.
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/test_case.rb
Expand Up @@ -91,7 +91,7 @@ def assert_template(options = {}, message = nil)
rendered = @templates rendered = @templates
msg = message || sprintf("expecting <%s> but rendering with <%s>", msg = message || sprintf("expecting <%s> but rendering with <%s>",
options.inspect, rendered.keys) options.inspect, rendered.keys)
matches_template = matches_template =
case options case options
when String when String
rendered.any? do |t, num| rendered.any? do |t, num|
Expand Down

0 comments on commit 623f2fb

Please sign in to comment.