Use the all matcher to check the existence of each path.
This change allows us to remove the `RSpec/IteratedExpectation` rule from `.rubocop_todo.yml` as we no longer iterate over each path to check existence. Note: We this PR didn't change the subsequent test checking for the negative expectations as this isn't part of the rule (see: https://github.com/rubocop-hq/rubocop-rspec/issues/278).
This commit is contained in:
parent
662641557e
commit
3a8e87134b
@ -78,11 +78,6 @@ RSpec/InstanceVariable:
|
||||
- 'utils/git_spec.rb'
|
||||
- 'version_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
RSpec/IteratedExpectation:
|
||||
Exclude:
|
||||
- 'cask/artifact/uninstall_zap_shared_examples.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
RSpec/LeadingSubject:
|
||||
|
||||
@ -183,9 +183,7 @@ shared_examples "#uninstall_phase or #zap_phase" do
|
||||
end
|
||||
|
||||
it "is supported" do
|
||||
paths.each do |path|
|
||||
expect(path).to exist
|
||||
end
|
||||
expect(paths).to all(exist)
|
||||
|
||||
subject
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user