Sha256: 6addd4f0fe603148a2b22c741e5b237ad86d97de57ecc3cc91b59396988a9044
Contents?: true
Size: 496 Bytes
Versions: 24
Compression:
Stored size: 496 Bytes
Contents
require 'factory_bot' Spree::Zone.class_eval do def self.global find_by(name: 'GlobalZone') || FactoryBot.create(:global_zone) end end Dir["#{File.dirname(__FILE__)}/factories/**"].each do |f| load File.expand_path(f) end FactoryBot.define do sequence(:random_string) { FFaker::Lorem.sentence } sequence(:random_description) { FFaker::Lorem.paragraphs(1 + Kernel.rand(5)).join("\n") } sequence(:random_email) { FFaker::Internet.email } sequence(:sku) { |n| "SKU-#{n}" } end
Version data entries
24 entries across 24 versions & 2 rubygems