1 require File.join( File.dirname(__FILE__), "..", "spec_helper" )
3 describe Mart::Customers::Cart do
5 it "should be empty on initialize" do
6 @cart = Mart::Customers::Cart.new
7 @cart.items.should be_empty
12 describe Mart::Customers::Cart, "tax calculation" do
14 it "should have zero tax on initialize" do
15 @cart = Mart::Customers::Cart.new
16 @cart.tax.should == 0.0
19 it "should return a valid tax_cost" do
20 @cart = Mart::Customers::Cart.new
21 # need to use a mock for this
24 #@cart.tax_cost.should == 17.871
29 describe Mart::Customers::Cart, "total calculation" do
31 it "should have a zero total on initialize" do
32 @cart = Mart::Customers::Cart.new
33 @cart.total.should == 0.0
38 describe Mart::Customers::Cart, "shipping_cost calculation" do
40 it "should have a zero shipping_cost on initialize" do
41 @cart = Mart::Customers::Cart.new
42 @cart.shipping_cost.should == 0.0