diff options
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/selector.rb | 2 |
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) |