zeisler/active_mocker

View on GitHub
lib/active_mocker/mock/mockable_method.rb

Summary

Maintainability
A
0 mins
Test Coverage

Method has too many lines. [20/10] (https://github.com/bbatsov/ruby-style-guide#short-methods)
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 == "#"

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

    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 == "#"

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

There are no issues that match your filters.

Category
Status