Sha256: f7f8711470a4fd0ceb9c2f4d0f9f76a93c13305ded3b99ea50569f96d699ea62
Contents?: true
Size: 847 Bytes
Versions: 32
Compression:
Stored size: 847 Bytes
Contents
require 'spec_helper' require 'spree/testing_support/factories/shipping_method_factory' RSpec.describe 'shipping method factory' do let(:factory_class) { Spree::ShippingMethod } describe 'plain shipping method' do let(:factory) { :shipping_method } it_behaves_like 'a working factory' it "should set calculable correctly" do shipping_method = create(factory) expect(shipping_method.calculator.calculable).to eq(shipping_method) end end describe 'base shipping method' do let(:factory) { :base_shipping_method } it 'builds successfully' do expect(build(factory)).to be_a(factory_class) end # No test for create, as that is not intended somehow end describe 'free shipping method' do let(:factory) { :free_shipping_method } it_behaves_like 'a working factory' end end
Version data entries
32 entries across 32 versions & 1 rubygems