Use proper enumerable method

Instead of using `select` and a not to get all the false matchers
we are now using `reject` to return them.
This commit is contained in:
Adam89 2014-05-22 22:12:37 +02:00 committed by Elliot Winkler
parent a88de1f87e
commit ba744ba1b7
1 changed files with 2 additions and 2 deletions

View File

@ -893,8 +893,8 @@ module Shoulda
end
def failing_submatchers
@failing_submatchers ||= submatchers.select do |matcher|
!matcher.matches?(subject)
@failing_submatchers ||= submatchers.reject do |matcher|
matcher.matches?(subject)
end
end