spec/rubocop/cop/rspec/overwriting_setup_spec.rb in rubocop-rspec-1.15.1 vs spec/rubocop/cop/rspec/overwriting_setup_spec.rb in rubocop-rspec-1.16.0

- old
+ new

@@ -1,40 +1,40 @@ RSpec.describe RuboCop::Cop::RSpec::OverwritingSetup do subject(:cop) { described_class.new } it 'finds overwriten `let`' do - expect_violation(<<-RUBY) + expect_offense(<<-RUBY) RSpec.describe User do let(:a) { a } let(:a) { b } ^^^^^^^^^^^^^ `a` is already defined. end RUBY end it 'finds overwriten `subject`' do - expect_violation(<<-RUBY) + expect_offense(<<-RUBY) RSpec.describe User do subject(:a) { a } let(:a) { b } ^^^^^^^^^^^^^ `a` is already defined. end RUBY end it 'finds `let!` overwriting `let`' do - expect_violation(<<-RUBY) + expect_offense(<<-RUBY) RSpec.describe User do let(:a) { b } let!(:a) { b } ^^^^^^^^^^^^^^ `a` is already defined. end RUBY end it 'ignores overwriting in different context' do - expect_no_violations(<<-RUBY) + expect_no_offenses(<<-RUBY) RSpec.describe User do let(:a) { a } context `different` do let(:a) { b }