Fix Style/RandomWithOffset

This commit is contained in:
Luis Ramos
2020-10-30 16:39:47 +00:00
parent b3196295e6
commit b0e889be2a
2 changed files with 1 additions and 7 deletions

View File

@@ -1281,12 +1281,6 @@ Style/NumericPredicate:
- 'lib/spree/money_decorator.rb'
- 'lib/tasks/sample_data.rake'
# Offense count: 1
# Cop supports --auto-correct.
Style/RandomWithOffset:
Exclude:
- 'spec/factories.rb'
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.

View File

@@ -2,7 +2,7 @@ require 'ffaker'
FactoryBot.define do
sequence(:random_string) { Faker::Lorem.sentence }
sequence(:random_description) { Faker::Lorem.paragraphs(1 + Kernel.rand(5)).join("\n") }
sequence(:random_description) { Faker::Lorem.paragraphs(Kernel.rand(1..5)).join("\n") }
sequence(:random_email) { Faker::Internet.email }
factory :classification, class: Spree::Classification do