Freshly/spicerack

View on GitHub
substance/lib/substance/rspec/shared_examples/an_input_object_with_a_class_collection_attribute.rb

Summary

Maintainability
A
0 mins
Test Coverage

Block has too many lines. [45/24]
Wontfix

RSpec.shared_examples_for "an input object with a class collection attribute" do |method, collection|
  subject(:define) { example_input_object_class.__send__(method, value) }

  let(:value) { Faker::Lorem.word.to_sym }

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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.

Example: CountAsOne: ['array', 'heredoc']

something do
  array = [         # +1
    1,
    2
  ]

  hash = {          # +3
    key: 'value'
  }

  msg = <<~HEREDOC  # +1
    Heredoc
    content.
  HEREDOC
end                 # 5 points

Block has too many lines. [33/24]
Wontfix

  describe "defines value" do
    let(:default) { Faker::Lorem.word }

    shared_examples_for "an value is defined" do
      it "adds to _values" do

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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.

Example: CountAsOne: ['array', 'heredoc']

something do
  array = [         # +1
    1,
    2
  ]

  hash = {          # +3
    key: 'value'
  }

  msg = <<~HEREDOC  # +1
    Heredoc
    content.
  HEREDOC
end                 # 5 points

There are no issues that match your filters.

Category
Status