lib/rubocop/cop/rspec/capybara/specific_finders.rb in rubocop-rspec-2.13.1 vs lib/rubocop/cop/rspec/capybara/specific_finders.rb in rubocop-rspec-2.13.2

- old
+ new

@@ -74,11 +74,18 @@ "#{key}: #{value}" end.compact.join(', ') end def offense_range(node) - range_between(node.loc.selector.begin_pos, - node.loc.end.end_pos) + range_between(node.loc.selector.begin_pos, end_pos(node)) + end + + def end_pos(node) + if node.loc.end + node.loc.end.end_pos + else + node.loc.expression.end_pos + end end end end end end