lib/rubocop/cop/rspec/multiple_expectations.rb in rubocop-rspec-2.11.1 vs lib/rubocop/cop/rspec/multiple_expectations.rb in rubocop-rspec-2.12.0

- old
+ new

@@ -29,9 +29,29 @@ # it 'sets the users age' do # expect(user.age).to eq(22) # end # end # + # @example `aggregate_failures: true` (default) + # + # # good - the cop ignores when RSpec aggregates failures + # describe UserCreator do + # it 'builds a user', :aggregate_failures do + # expect(user.name).to eq("John") + # expect(user.age).to eq(22) + # end + # end + # + # @example `aggregate_failures: false` + # + # # Detected as an offense + # describe UserCreator do + # it 'builds a user', aggregate_failures: false do + # expect(user.name).to eq("John") + # expect(user.age).to eq(22) + # end + # end + # # @example configuration # # # .rubocop.yml # # RSpec/MultipleExpectations: # # Max: 2