diff --git a/spec/lib/spree/core/product_duplicator_spec.rb b/spec/lib/spree/core/product_duplicator_spec.rb index 452aa51c12..691e9e80f0 100644 --- a/spec/lib/spree/core/product_duplicator_spec.rb +++ b/spec/lib/spree/core/product_duplicator_spec.rb @@ -8,7 +8,7 @@ describe Spree::Core::ProductDuplicator do name: "foo", taxons: [], product_properties: [property], - master: variant, + master: master_variant, option_types: [] end @@ -25,7 +25,7 @@ describe Spree::Core::ProductDuplicator do double 'New Property' end - let(:variant) do + let(:master_variant) do double 'Variant', sku: "12345", price: 19.99, @@ -49,7 +49,7 @@ describe Spree::Core::ProductDuplicator do before do expect(product).to receive(:dup).and_return(new_product) - expect(variant).to receive(:dup).and_return(new_variant) + expect(master_variant).to receive(:dup).and_return(new_variant) expect(image).to receive(:dup).and_return(new_image) expect(property).to receive(:dup).and_return(new_property) end @@ -68,8 +68,8 @@ describe Spree::Core::ProductDuplicator do expect(new_variant).to receive(:sku=).with("") expect(new_variant).to receive(:deleted_at=).with(nil) expect(new_variant).to receive(:images=).with([new_image]) - expect(new_variant).to receive(:price=).with(variant.price) - expect(new_variant).to receive(:currency=).with(variant.currency) + expect(new_variant).to receive(:price=).with(master_variant.price) + expect(new_variant).to receive(:currency=).with(master_variant.currency) expect(image).to receive(:attachment_blob) expect(new_image).to receive_message_chain(:attachment, :attach)