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

- old
+ new

@@ -7,18 +7,18 @@ let(:cop_config) do { 'EnforcedStyle' => 'allow' } end it 'flags expect(...).to receive' do - expect_violation(<<-RUBY) + expect_offense(<<-RUBY) expect(foo).to receive(:bar) ^^^^^^ Prefer `allow` for setting message expectations. RUBY end it 'approves of allow(...).to receive' do - expect_no_violations('allow(foo).to receive(:bar)') + expect_no_offenses('allow(foo).to receive(:bar)') end include_examples 'detects style', 'allow(foo).to receive(:bar)', 'allow' include_examples 'detects style', 'expect(foo).to receive(:bar)', 'expect' end @@ -27,17 +27,17 @@ let(:cop_config) do { 'EnforcedStyle' => 'expect' } end it 'flags allow(...).to receive' do - expect_violation(<<-RUBY) + expect_offense(<<-RUBY) allow(foo).to receive(:bar) ^^^^^ Prefer `expect` for setting message expectations. RUBY end it 'approves of expect(...).to receive' do - expect_no_violations('expect(foo).to receive(:bar)') + expect_no_offenses('expect(foo).to receive(:bar)') end include_examples 'detects style', 'expect(foo).to receive(:bar)', 'expect' include_examples 'detects style', 'allow(foo).to receive(:bar)', 'allow' end