diff options
author | Timm <kaspth@gmail.com> | 2013-09-23 14:49:14 +0200 |
---|---|---|
committer | Timm <kaspth@gmail.com> | 2014-06-16 21:04:16 +0200 |
commit | 68e08fe8c955d5b4a6839d4587e2f32b77f4fe44 (patch) | |
tree | e13d6c50a3bb3e5ddfa12473c189cec0554a188f /actionview/lib/action_view | |
parent | 9ef95a7019fc531ff74a91f0ca0871e6639990b7 (diff) | |
download | rails-68e08fe8c955d5b4a6839d4587e2f32b77f4fe44.tar.gz rails-68e08fe8c955d5b4a6839d4587e2f32b77f4fe44.tar.bz2 rails-68e08fe8c955d5b4a6839d4587e2f32b77f4fe44.zip |
Silenced deprecation warnings in the tests. Documentation uses present tense. Changed deprecation message to not use you. Also returning from rescue block in catch_invalid_selector to abort reraising the exception.
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/testing/assertions/selector.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionview/lib/action_view/testing/assertions/selector.rb b/actionview/lib/action_view/testing/assertions/selector.rb index aac5a82e81..58f3f329b1 100644 --- a/actionview/lib/action_view/testing/assertions/selector.rb +++ b/actionview/lib/action_view/testing/assertions/selector.rb @@ -29,7 +29,7 @@ module ActionView # Returns an empty Nokogiri::XML::NodeSet if no match is found. # # The selector may be a CSS selector expression (String). - # css_select will return nil if called with an invalid css selector. + # css_select returns nil if called with an invalid css selector. # # # Selects all div tags # divs = css_select("div") @@ -96,7 +96,7 @@ module ActionView # The selector may be a CSS selector expression (String) or an expression # with substitution values (Array). # Substitution uses a custom pseudo class match. Pass in whatever attribute you want to match (enclosed in quotes) and a ? for the substitution. - # assert_select will return nil if called with an invalid css selector. + # assert_select returns nil if called with an invalid css selector. # # assert_select "div:match('id', ?)", /\d+/ # @@ -293,7 +293,8 @@ module ActionView begin yield rescue Nokogiri::CSS::SyntaxError => e - ActiveSupport::Deprecation.warn("You are using an invalid CSS selector and the assertion was not run. Please review it.\n#{e}") + ActiveSupport::Deprecation.warn("The assertion was not run because of an invalid css selector.\n#{e}") + return end end |