spec/factories/user.rb
Block has too many lines. [26/25] Open
Open
FactoryGirl.define do
factory :user do
sequence(:login) { |n| "user_#{n}" }
sequence(:email) { |n| "user_#{n}@example.com" }
password 'quirk'
- Read upRead up
- Exclude checks
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
Open
after(:create) do |u|
u.add_as_member_to_default_baskets
end
- Read upRead up
- Exclude checks
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
Open
after(:create) do |u|
u.activate
end
- Read upRead up
- Exclude checks
Use symbols as procs when possible.
Example:
# bad
something.map { |s| s.upcase }
# good
something.map(&:upcase)