lib/rubocop/cop/rspec/example_length.rb in rubocop-rspec-2.24.1 vs lib/rubocop/cop/rspec/example_length.rb in rubocop-rspec-2.25.0
- old
+ new
@@ -24,15 +24,16 @@
# service = described_class.new
# result = service.call
# expect(result).to be(true)
# end
#
- # You can set literals you want to fold with `CountAsOne`.
- # Available are: 'array', 'hash', and 'heredoc'. Each literal
- # will be counted as one line regardless of its actual size.
+ # You can set constructs you want to fold with `CountAsOne`.
+ # Available are: 'array', 'hash', 'heredoc', and 'method_call'.
+ # Each construct will be counted as one line regardless of
+ # its actual size.
#
- # @example CountAsOne: ['array', 'heredoc']
+ # @example CountAsOne: ['array', 'heredoc', 'method_call']
#
# it do
# array = [ # +1
# 1,
# 2
@@ -44,10 +45,15 @@
#
# msg = <<~HEREDOC # +1
# Heredoc
# content.
# HEREDOC
- # end # 5 points
+ #
+ # foo( # +1
+ # 1,
+ # 2
+ # )
+ # end # 6 points
#
class ExampleLength < Base
include CodeLength
LABEL = 'Example'