lib/rubocop/cop/rspec/variable_definition.rb in rubocop-rspec-2.23.2 vs lib/rubocop/cop/rspec/variable_definition.rb in rubocop-rspec-2.24.0
- old
+ new
@@ -33,11 +33,11 @@
def on_send(node)
return unless inside_example_group?(node)
variable_definition?(node) do |variable|
- next unless style_violation?(variable)
+ next unless style_offense?(variable)
add_offense(
variable,
message: format(MSG, style: style)
) do |corrector|
@@ -57,10 +57,10 @@
else
variable.value.to_sym.inspect
end
end
- def style_violation?(variable)
+ def style_offense?(variable)
style == :symbols && string?(variable) ||
style == :strings && symbol?(variable)
end
def string?(node)