Sha256: 6890b422eb335bf6de5079699b8c9bc08f52bcd0ee047804759470dc2b9040d4

Contents?: true

Size: 753 Bytes

Versions: 3

Compression:

Stored size: 753 Bytes

Contents

FactoryGirl.define do

  factory :item, :class => Akatus::Item do

    reference     'ABC1234567'
    description   'Caixa de bombons sortidos'
    quantity      32
    price         BigDecimal.new('32.25')
    weight        BigDecimal.new('2.25')
    shipping_cost BigDecimal.new('9.90')
    discount      0

    trait :with_percentage_split_fee do
      split_fee {
        Akatus::SplitFee.new({
          :receiver => 'ze@hotmail.com',
          :type     => 'porcentagem',
          :amount   => 20
        })
      }
    end

    trait :with_fixed_split_fee do
      split_fee {
        Akatus::SplitFee.new({
          :receiver => 'ze@hotmail.com',
          :type     => 'real',
          :amount   => 20
        })
      }
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
akatus-1.0.2 spec/factories/item_factories.rb
akatus-1.0.1 spec/factories/item_factories.rb
akatus-1.0.0 spec/factories/item_factories.rb