Sha256: 1fc85695756f646d6a1b55af7e5d76184ddf8504710fbe35ecf5f5f6329767c3
Contents?: true
Size: 445 Bytes
Versions: 9
Compression:
Stored size: 445 Bytes
Contents
require 'spec/spec_helper' describe ShopLineItem do dataset :shop_line_items, :shop_products, :shop_discountables context 'line item with a discount' do it 'should calculate a reduced price' do price = shop_line_items(:one).price ShopDiscountable.create(:discount => shop_discounts(:ten_percent), :discounted => shop_line_items(:one)) shop_line_items(:one).price.should === (price-price*0.1) end end end
Version data entries
9 entries across 9 versions & 1 rubygems