spec/rubocop/cop/rspec/let_setup_spec.rb in rubocop-rspec-1.33.0 vs spec/rubocop/cop/rspec/let_setup_spec.rb in rubocop-rspec-1.34.0
- old
+ new
@@ -5,11 +5,11 @@
it 'complains when let! is used and not referenced' do
expect_offense(<<-RUBY)
describe Foo do
let!(:foo) { bar }
- ^^^^^^^^^^ Do not use `let!` for test setup.
+ ^^^^^^^^^^ Do not use `let!` to setup objects not referenced in tests.
it 'does not use foo' do
expect(baz).to eq(qux)
end
end
@@ -48,10 +48,10 @@
it 'complains when let! is used and not referenced within nested group' do
expect_offense(<<-RUBY)
describe Foo do
context 'when something special happens' do
let!(:foo) { bar }
- ^^^^^^^^^^ Do not use `let!` for test setup.
+ ^^^^^^^^^^ Do not use `let!` to setup objects not referenced in tests.
it 'does not use foo' do
expect(baz).to eq(qux)
end
end