lib/rubocop/cop/rspec/example_length.rb in rubocop-rspec-1.20.1 vs lib/rubocop/cop/rspec/example_length.rb in rubocop-rspec-1.21.0

- old
+ new

@@ -26,11 +26,11 @@ # expect(result).to be(true) # end class ExampleLength < Cop include CodeLength - MSG = 'Example has too many lines [%d/%d].'.freeze + MSG = 'Example has too many lines [%<total>d/%<max>d].'.freeze def on_block(node) return unless example?(node) length = code_length(node) @@ -45,10 +45,10 @@ def code_length(node) node.source.lines[1..-2].count { |line| !irrelevant_line(line) } end def message(length) - format(MSG, length, max_length) + format(MSG, total: length, max: max_length) end end end end end