summaryrefslogtreecommitdiff
path: root/spec/unit/cart_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/cart_spec.rb')
-rw-r--r--spec/unit/cart_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/unit/cart_spec.rb b/spec/unit/cart_spec.rb
index eb77a36..3459048 100644
--- a/spec/unit/cart_spec.rb
+++ b/spec/unit/cart_spec.rb
@@ -38,7 +38,7 @@ describe Cart do
sut.total_items.should == 1
end
- it "should calculate a total price of $0.00" do
+ it "should calculate a total price" do
sut.total_price.should == crayons.price
end
end
@@ -56,6 +56,10 @@ describe Cart do
it "should indicate the total number of items in the cart" do
sut.total_items.should == 2
end
+
+ it "should calculate the total price" do
+ sut.total_price.should == crayons.price + crayons.price
+ end
end
context "when there is multiple products" do
@@ -68,6 +72,10 @@ describe Cart do
it "should indicate the total number of items in the cart" do
sut.total_items.should == 3
end
+
+ it "should calculate the total price" do
+ sut.total_price.should == crayons.price + phone.price + laptop.price
+ end
end
end