Sha256: 3d49dd36d2c9df183e548ebc1455e29a3869bd643ddbaeade22b70a96a53fa2a

Contents?: true

Size: 915 Bytes

Versions: 31

Compression:

Stored size: 915 Bytes

Contents

class ShopProductAlternative < ShopProduct; end

class ShopLineItemsDataset < Dataset::Base
  
  uses :shop_products, :shop_orders
  
  def load
    create_record :shop_line_item, :one,
      :item_id    => shop_products(:crusty_bread).id,
      :order      => shop_orders(:one_item),
      :item_type  => 'ShopProduct',
      :item_price => shop_products(:crusty_bread).price
      
    create_record :shop_line_item, :two,
      :item_id    => shop_products(:soft_bread).id,
      :order      => shop_orders(:several_items),
      :item_type  => 'ShopProduct',
      :quantity   => 2,
      :item_price => shop_products(:soft_bread).price
      
    create_record :shop_line_item, :three,
      :item_id    => shop_products(:choc_milk).id,
      :order      => shop_orders(:several_items),
      :item_type  => 'ShopProduct',
      :quantity   => 3,
      :item_price => shop_products(:choc_milk).price
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
radiant-shop-extension-0.92.2 spec/datasets/shop_line_items.rb
radiant-shop-extension-0.92.1 spec/datasets/shop_line_items.rb
radiant-shop-extension-0.92.0 spec/datasets/shop_line_items.rb
radiant-shop-extension-0.91.7 spec/datasets/shop_line_items.rb
radiant-shop-extension-0.91.4 spec/datasets/shop_line_items.rb
radiant-shop-extension-0.91.3 spec/datasets/shop_line_items.rb
radiant-shop-extension-0.91.2 spec/datasets/shop_line_items.rb
radiant-shop-extension-0.90.4 spec/datasets/shop_line_items.rb
radiant-shop-extension-0.90.2 spec/datasets/shop_line_items.rb
radiant-shop-extension-0.90.1 spec/datasets/shop_line_items.rb
radiant-shop-extension-0.90.0 spec/datasets/shop_line_items.rb