Sha256: 6824b8b981c4174048774c5bff5f2e89b1d902cac5ab700e2d85c64c6dd83d03
Contents?: true
Size: 1.45 KB
Versions: 9
Compression:
Stored size: 1.45 KB
Contents
Factory.define(:adjustment) do |record| record.amount { BigDecimal.new("#{rand(200)}.#{rand(99)}") } record.description { Faker::Lorem.sentence } # associations: #record.association(:order, :factory => :order) end Factory.define(:charge, :class => Charge) do |record| record.amount { BigDecimal.new("#{rand(200)}.#{rand(99)}") } record.description { Faker::Lorem.sentence } # associations: #record.association(:order, :factory => :order) end Factory.define(:shipping_charge, :class => ShippingCharge) do |record| record.amount { BigDecimal.new("#{rand(200)}.#{rand(99)}") } record.description { Faker::Lorem.sentence } # associations: #record.association(:order, :factory => :order) end Factory.define(:tax_charge, :class => TaxCharge) do |record| record.amount { BigDecimal.new("#{rand(200)}.#{rand(99)}") } record.description { Faker::Lorem.sentence } # associations: record.association(:order, :factory => :order) end Factory.define(:credit, :class => Credit) do |record| record.amount { BigDecimal.new("#{rand(200)}.#{rand(99)}") } record.description { Faker::Lorem.sentence } # associations: record.association(:order, :factory => :order) end Factory.define(:coupon_credit, :class => CouponCredit) do |f| f.amount { BigDecimal.new("#{rand(200)}.#{rand(99)}") } f.description { Faker::Lorem.sentence } # associations: f.association(:order, :factory => :order) f.association(:adjustment_source, :factory => :coupon) end
Version data entries
9 entries across 9 versions & 1 rubygems