I hereby claim:
- I am lupinedev on github.
- I am lupinedev (https://keybase.io/lupinedev) on keybase.
- I have a public key ASBAPN53gp177aGwTgozkocXsljZuMiOQyzzpHi-GUTBxQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
describe Order do | |
describe "#sub_total" do | |
# writing everything to db | |
it "should calculate the sum of all of its shop_items" do | |
order = Order.create(some_options) | |
3.times do | |
order.shop_items << ShopItem.create(:price => 2.00) | |
end | |
order.subtotal.should be_within(0.01).of(6.0) | |
end |