Skip to content

Commit 1feb7e4

Browse files
committed
style(rubocop): fix rubocop offenses from new cops
1 parent 8aacbb9 commit 1feb7e4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/rspec/path_matchers/matchers/directory_matcher.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@ def nested_matchers
150150

151151
# Checks for any files/directories on disk that were not declared in the block.
152152
def check_for_unexpected_entries
153-
positively_declared_entries = nested_matchers.reject do |m|
154-
m.is_a?(RSpec::PathMatchers::Matchers::NoEntryMatcher)
155-
end.map(&:entry_name)
153+
positively_declared_entries = nested_matchers.grep_v(RSpec::PathMatchers::Matchers::NoEntryMatcher).map(&:entry_name)
156154

157155
actual_entries = Dir.children(path)
158156
unexpected_entries = actual_entries - positively_declared_entries

0 commit comments

Comments
 (0)