spec/rubocop/cop/rspec/instance_variable_spec.rb in rubocop-rspec-1.12.0 vs spec/rubocop/cop/rspec/instance_variable_spec.rb in rubocop-rspec-1.13.0

- old
+ new

@@ -1,14 +1,14 @@ -describe RuboCop::Cop::RSpec::InstanceVariable do +RSpec.describe RuboCop::Cop::RSpec::InstanceVariable do subject(:cop) { described_class.new } it 'finds an instance variable inside a describe' do expect_violation(<<-RUBY) describe MyClass do before { @foo = [] } it { expect(@foo).to be_empty } - ^^^^ Use `let` instead of an instance variable + ^^^^ Use `let` instead of an instance variable. end RUBY end it 'ignores non-spec blocks' do @@ -22,11 +22,11 @@ it 'finds an instance variable inside a shared example' do expect_violation(<<-RUBY) shared_examples 'shared example' do it { expect(@foo).to be_empty } - ^^^^ Use `let` instead of an instance variable + ^^^^ Use `let` instead of an instance variable. end RUBY end it 'ignores an instance variable without describe' do @@ -57,10 +57,10 @@ it 'flags an instance variable when it is also assigned' do expect_violation(<<-RUBY) describe MyClass do before { @foo = [] } it { expect(@foo).to be_empty } - ^^^^ Use `let` instead of an instance variable + ^^^^ Use `let` instead of an instance variable. end RUBY end it 'ignores an instance variable when it is not assigned' do