zeisler/active_mocker

View on GitHub
lib/active_mocker/mock_creator/associations.rb

Summary

Maintainability
A
0 mins
Test Coverage

Add an empty line after magic comments. (https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code)
Open

module ActiveMocker

Checks for a newline after the final magic comment.

Example:

# good
# frozen_string_literal: true

# Some documentation for Person
class Person
  # Some code
end

# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
  # Some code
end

Rename has_many to many?. (https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark)
Open

      def has_many

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value)
end

# good
def even?(value)
end

# bad
def has_value?
end

# good
def value?
end

Rename has_and_belongs_to_many to and_belongs_to_many?. (https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark)
Open

      def has_and_belongs_to_many

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value)
end

# good
def even?(value)
end

# bad
def has_value?
end

# good
def value?
end

Rename has_one to one?. (https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark)
Open

      def has_one

This cop makes sure that predicates are named properly.

Example:

# bad
def is_even?(value)
end

# good
def even?(value)
end

# bad
def has_value?
end

# good
def value?
end

There are no issues that match your filters.

Category
Status