We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8aacbb9 commit 1feb7e4Copy full SHA for 1feb7e4
1 file changed
lib/rspec/path_matchers/matchers/directory_matcher.rb
@@ -150,9 +150,7 @@ def nested_matchers
150
151
# Checks for any files/directories on disk that were not declared in the block.
152
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)
+ positively_declared_entries = nested_matchers.grep_v(RSpec::PathMatchers::Matchers::NoEntryMatcher).map(&:entry_name)
156
157
actual_entries = Dir.children(path)
158
unexpected_entries = actual_entries - positively_declared_entries
0 commit comments