spec/factories/user.rb

Summary

Maintainability
A
0 mins
Test Coverage

Block has too many lines. [26/25]
Open

FactoryGirl.define do
  factory :user do
    sequence(:login) { |n| "user_#{n}" }
    sequence(:email) { |n| "user_#{n}@example.com" }
    password 'quirk'
Severity: Minor
Found in spec/factories/user.rb by rubocop

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.

Pass &:add_as_member_to_default_baskets as an argument to after instead of a block.
Open

      after(:create) do |u|
        u.add_as_member_to_default_baskets
      end
Severity: Minor
Found in spec/factories/user.rb by rubocop

Use symbols as procs when possible.

Example:

# bad
something.map { |s| s.upcase }

# good
something.map(&:upcase)

Pass &:activate as an argument to after instead of a block.
Open

      after(:create) do |u|
        u.activate
      end
Severity: Minor
Found in spec/factories/user.rb by rubocop

Use symbols as procs when possible.

Example:

# bad
something.map { |s| s.upcase }

# good
something.map(&:upcase)

There are no issues that match your filters.

Category
Status