Files
grecia/spec/factories/analytics.rb
Javi Martín 40244d6411 Add and apply FactoryBot/FactoryClassName rule
This rule is available since rubocop-rspec 1.37.0. We were already
applying the same principle in the models since commit 234a5108.
2020-10-25 14:23:53 +01:00

18 lines
382 B
Ruby

FactoryBot.define do
factory :ahoy_event, class: "Ahoy::Event" do
id { SecureRandom.uuid }
time { DateTime.current }
sequence(:name) { |n| "Event #{n} type" }
end
factory :visit do
id { SecureRandom.uuid }
started_at { DateTime.current }
end
factory :campaign do
sequence(:name) { |n| "Campaign #{n}" }
sequence(:track_id, &:to_s)
end
end