Sha256: 8c6beebde5cd58afc38633d363cba2e47e17e5e37cd236792687b372c167ed7a

Contents?: true

Size: 559 Bytes

Versions: 5

Compression:

Stored size: 559 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper.rb'

describe Order do
  before(:each) do
    @order = Order.new
    add_stubs(@order, :save => true)
  end

  describe "with address state" do
    before(:each) {@order.state = 'address'}
    describe "next" do
      it "should transition to credit_card_payment state" do
        @order.next
        @order.state.should == "creditcard_payment"
      end
      it "should calculate the tax during the transition" do
        @order.should_receive(:calculate_tax)
        @order.next
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spree-0.4.1 vendor/extensions/tax_calculator/spec/models/order_spec.rb
spree-0.4.0 vendor/extensions/tax_calculator/spec/models/order_spec.rb
spree-0.5.0 vendor/extensions/tax_calculator/spec/models/order_spec.rb
spree-0.6.0 vendor/extensions/tax_calculator/spec/models/order_spec.rb
spree-0.5.1 vendor/extensions/tax_calculator/spec/models/order_spec.rb