aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimm <kaspth@gmail.com>2013-08-01 19:26:53 +0200
committerTimm <kaspth@gmail.com>2014-06-16 21:03:59 +0200
commitf2c9734be0e007a2f149b53c291d098d283ac376 (patch)
tree3d86e2d4edc3ea2cca822a76bf0d98f9ff2d6f41
parent91650ddc3a38d46b254e5fd8ab3cc7a5823ed9ce (diff)
downloadrails-f2c9734be0e007a2f149b53c291d098d283ac376.tar.gz
rails-f2c9734be0e007a2f149b53c291d098d283ac376.tar.bz2
rails-f2c9734be0e007a2f149b53c291d098d283ac376.zip
Returning from filter if matches are empty.
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/selector.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb
index c2a5d59577..529db22fff 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb
@@ -338,7 +338,7 @@ module ActionDispatch
def filter(matches)
match_with = comparisons[:text] || comparisons[:html]
- return matches unless match_with
+ return matches if matches.empty? || !match_with
content_mismatch = nil
text_matches = comparisons.has_key?(:text)