Sha256: 0de16116e457c06b2f9ce7cba4a0aade23295fc0c3408138781126277b13f782

Contents?: true

Size: 572 Bytes

Versions: 11

Compression:

Stored size: 572 Bytes

Contents

require 'spec_helper'

RSpec.describe Spree::Core::StockConfiguration do
  describe '#estimator_class' do
    let(:stock_configuration) { described_class.new }
    subject { stock_configuration.estimator_class }

    it "returns Spree::Stock::Estimator" do
      is_expected.to be ::Spree::Stock::Estimator
    end

    context "with another constant name assiged" do
      MyEstimator = Class.new
      before { stock_configuration.estimator_class = MyEstimator.to_s }

      it "returns the constant" do
        is_expected.to be MyEstimator
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
solidus_core-1.3.2 spec/lib/spree/core/stock_configuration_spec.rb
solidus_core-1.2.3 spec/lib/spree/core/stock_configuration_spec.rb
solidus_core-1.3.1 spec/lib/spree/core/stock_configuration_spec.rb
solidus_core-1.3.0 spec/lib/spree/core/stock_configuration_spec.rb
solidus_core-1.3.0.rc2 spec/lib/spree/core/stock_configuration_spec.rb
solidus_core-1.3.0.rc1 spec/lib/spree/core/stock_configuration_spec.rb
solidus_core-1.3.0.beta1 spec/lib/spree/core/stock_configuration_spec.rb
solidus_core-1.2.2 spec/lib/spree/core/stock_configuration_spec.rb
solidus_core-1.2.1 spec/lib/spree/core/stock_configuration_spec.rb
solidus_core-1.2.0 spec/lib/spree/core/stock_configuration_spec.rb
solidus_core-1.2.0.rc2 spec/lib/spree/core/stock_configuration_spec.rb