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

- old
+ new

@@ -2,11 +2,11 @@ RSpec.describe RuboCop::Cop::RSpec::RepeatedDescription do subject(:cop) { described_class.new } it 'registers an offense for repeated descriptions' do - expect_violation(<<-RUBY) + expect_offense(<<-RUBY) describe 'doing x' do it "does x" do ^^^^^^^^^^^ Don't repeat descriptions within an example group. end @@ -16,11 +16,11 @@ end RUBY end it 'registers offense for repeated descriptions separated by a context' do - expect_violation(<<-RUBY) + expect_offense(<<-RUBY) describe 'doing x' do it "does x" do ^^^^^^^^^^^ Don't repeat descriptions within an example group. end @@ -36,11 +36,11 @@ end RUBY end it 'ignores descriptions repeated in a shared context' do - expect_no_violations(<<-RUBY) + expect_no_offenses(<<-RUBY) describe 'doing x' do it "does x" do end shared_context 'shared behavior' do @@ -50,11 +50,11 @@ end RUBY end it 'ignores repeated descriptions in a nested context' do - expect_no_violations(<<-RUBY) + expect_no_offenses(<<-RUBY) describe 'doing x' do it "does x" do end context 'in a certain use case' do @@ -64,10 +64,10 @@ end RUBY end it 'does not flag tests which do not contain description strings' do - expect_no_violations(<<-RUBY) + expect_no_offenses(<<-RUBY) describe 'doing x' do it { foo } it { bar } end RUBY