From 74238b111e227b7ec97d5f9f6f36a024705e9174 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Fri, 28 Feb 2014 15:19:57 +1100 Subject: [PATCH] Fixing the order spec --- spec/models/spree/order_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/models/spree/order_spec.rb b/spec/models/spree/order_spec.rb index 91525cb83a..ff17188998 100644 --- a/spec/models/spree/order_spec.rb +++ b/spec/models/spree/order_spec.rb @@ -262,6 +262,7 @@ describe Spree::Order do let(:order) { build(:order, distributor: distributor) } before do + order.ship_address = distributor.address.clone order.save # just to trigger our autopopulate the first time ;) end @@ -274,7 +275,7 @@ describe Spree::Order do order.shipping_method = create(:shipping_method, require_ship_address: false) order.ship_address.update_attribute :firstname, "will" order.save - order.ship_address.firstname.shoul == distributor.address.firstname + order.ship_address.firstname.should == distributor.address.firstname end it "does not populate the shipping address if the shipping method requires a delivery address" do @@ -285,6 +286,7 @@ describe Spree::Order do end it "doesn't attempt to create a shipment if the order is not yet valid" do + order.shipping_method = create(:shipping_method, require_ship_address: false) #Shipment.should_not_r order.create_shipment! end