lib/rubocop/cop/rspec/instance_variable.rb in rubocop-rspec-1.12.0 vs lib/rubocop/cop/rspec/instance_variable.rb in rubocop-rspec-1.13.0
- old
+ new
@@ -45,11 +45,11 @@
# let(:foo) { [] }
# it { expect(foo).to be_empty }
# end
#
class InstanceVariable < Cop
- MESSAGE = 'Use `let` instead of an instance variable'.freeze
+ MSG = 'Use `let` instead of an instance variable.'.freeze
EXAMPLE_GROUP_METHODS = ExampleGroups::ALL + SharedGroups::ALL
def_node_matcher :spec_group?, EXAMPLE_GROUP_METHODS.block_pattern
@@ -61,10 +61,10 @@
return unless spec_group?(node)
ivar_usage(node) do |ivar, name|
return if assignment_only? && !ivar_assigned?(node, name)
- add_offense(ivar, :expression, MESSAGE)
+ add_offense(ivar, :expression)
end
end
private