Sha256: 197dd7f0fb84641ef737886a49cca2c2ee43abafb3efa448d5726dda8a8136a7

Contents?: true

Size: 204 Bytes

Versions: 1

Compression:

Stored size: 204 Bytes

Contents

FactoryGirl.define do
  sequence :coupon_code do |n|
    n.to_s.rjust(5, '0')
  end

  factory :coupon, class: 'Shopper::Coupon' do
    code { generate :coupon_code }
    discount { rand(100) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoppper-0.1.0 spec/factories/coupons.rb