spec/rubocop/cop/rspec/multiple_expectations_spec.rb in rubocop-rspec-1.9.1 vs spec/rubocop/cop/rspec/multiple_expectations_spec.rb in rubocop-rspec-1.10.0
- old
+ new
@@ -8,11 +8,11 @@
it 'flags multiple expectations' do
expect_violation(<<-RUBY)
describe Foo do
it 'uses expect twice' do
- ^^^^^^^^^^^^^^^^^^^^^^ Too many expectations.
+ ^^^^^^^^^^^^^^^^^^^^^^ Example has too many expectations [2/1]
expect(foo).to eq(bar)
expect(baz).to eq(bar)
end
end
RUBY
@@ -51,10 +51,10 @@
it 'flags three expectations' do
expect_violation(<<-RUBY)
describe Foo do
it 'uses expect three times' do
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Too many expectations.
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Example has too many expectations [3/2]
expect(foo).to eq(bar)
expect(baz).to eq(bar)
expect(qux).to eq(bar)
end
end