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

- old
+ new

@@ -2,11 +2,11 @@ RSpec.describe RuboCop::Cop::RSpec::LetSetup do subject(:cop) { described_class.new } it 'complains when let! is used and not referenced' do - expect_violation(<<-RUBY) + expect_offense(<<-RUBY) describe Foo do let!(:foo) { bar } ^^^^^^^^^^ Do not use `let!` for test setup. it 'does not use foo' do @@ -15,11 +15,11 @@ end RUBY end it 'ignores let! when used in `before`' do - expect_no_violations(<<-RUBY) + expect_no_offenses(<<-RUBY) describe Foo do let!(:foo) { bar } before do foo @@ -31,11 +31,11 @@ end RUBY end it 'ignores let! when used in example' do - expect_no_violations(<<-RUBY) + expect_no_offenses(<<-RUBY) describe Foo do let!(:foo) { bar } it 'uses foo' do foo @@ -44,10 +44,10 @@ end RUBY end it 'complains when let! is used and not referenced within nested group' do - expect_violation(<<-RUBY) + expect_offense(<<-RUBY) describe Foo do context 'when something special happens' do let!(:foo) { bar } ^^^^^^^^^^ Do not use `let!` for test setup.