lib/rubocop/cop/rspec/empty_hook.rb in rubocop-rspec-2.4.0 vs lib/rubocop/cop/rspec/empty_hook.rb in rubocop-rspec-2.5.0
- old
+ new
@@ -34,10 +34,13 @@
PATTERN
def on_block(node)
empty_hook?(node) do |hook|
add_offense(hook) do |corrector|
- range = range_with_surrounding_space(range: node.loc.expression)
+ range = range_with_surrounding_space(
+ range: node.loc.expression,
+ side: :left
+ )
corrector.remove(range)
end
end
end
end