lib/active_mocker/mock/mockable_method.rb
Method has too many lines. [20/10] (https://github.com/bbatsov/ruby-style-guide#short-methods) Open
Open
def __am_raise_not_mocked_error(method:, caller:, type:)
variable_name, klass, method_type = if is_a?(Relation)
klass = self.class.name.underscore.split("/").first
["#{klass}_relation", klass.camelize, :scopes]
elsif type == "#"
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Assignment Branch Condition size for __am_raise_not_mocked_error is too high. [19.42/15] (http://c2.com/cgi/wiki?AbcMetric) Open
Open
def __am_raise_not_mocked_error(method:, caller:, type:)
variable_name, klass, method_type = if is_a?(Relation)
klass = self.class.name.underscore.split("/").first
["#{klass}_relation", klass.camelize, :scopes]
elsif type == "#"
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric