diff options
author | Timm <kaspth@gmail.com> | 2013-08-16 21:56:39 +0200 |
---|---|---|
committer | Timm <kaspth@gmail.com> | 2014-06-16 21:04:09 +0200 |
commit | e600b3a34116d90b9df5c9bf359e05564999b359 (patch) | |
tree | 8c475f679e666cfd753b785baa7e0b948889b90b /actionview/lib/action_view | |
parent | 4b55c0aa2e923e6102c9f80e12bbfde4431a7412 (diff) | |
download | rails-e600b3a34116d90b9df5c9bf359e05564999b359.tar.gz rails-e600b3a34116d90b9df5c9bf359e05564999b359.tar.bz2 rails-e600b3a34116d90b9df5c9bf359e05564999b359.zip |
Changed conditional check in filter. Removed weird comments.
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/testing/assertions/selector.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/actionview/lib/action_view/testing/assertions/selector.rb b/actionview/lib/action_view/testing/assertions/selector.rb index 73f31c2127..b53e0c1b55 100644 --- a/actionview/lib/action_view/testing/assertions/selector.rb +++ b/actionview/lib/action_view/testing/assertions/selector.rb @@ -341,16 +341,12 @@ module ActionView content.strip! unless NO_STRIP.include?(match.name) content.sub!(/\A\n/, '') if text_matches && match.name == "textarea" - unless match_with.is_a?(Regexp) ? (content =~ match_with) : (content == match_with.to_s) - content_mismatch ||= sprintf("<%s> expected but was\n<%s>.", match_with, content) - true - end + next if match_with.is_a?(Regexp) ? (content =~ match_with) : (content == match_with.to_s) + content_mismatch ||= sprintf("<%s> expected but was\n<%s>.", match_with, content) + true end - # Expecting foo found bar element only if found zero, not if - # found one but expecting two. self.message ||= content_mismatch if remaining.empty? - Nokogiri::XML::NodeSet.new(matches.document, remaining) end |