Sha256: a185da54711e1713eccf136259ca4418eeb03c4554db54189ba336996362784b
Contents?: true
Size: 1.05 KB
Versions: 7
Compression:
Stored size: 1.05 KB
Contents
require_relative "spec_helper_initializer" describe "Shakapacker::CompilerStrategy" do describe "#from_config" do it "returns and instance of MtimeStrategy when compiler_strategy is set to mtime" do allow(Shakapacker.config).to receive(:compiler_strategy).and_return("mtime") expect(Shakapacker::CompilerStrategy.from_config).to be_an_instance_of(Shakapacker::MtimeStrategy) end it "returns and instance of DigestStrategy when compiler_strategy is set to digest" do allow(Shakapacker.config).to receive(:compiler_strategy).and_return("digest") expect(Shakapacker::CompilerStrategy.from_config).to be_an_instance_of(Shakapacker::DigestStrategy) end it "raise exception for unknown compiler_strategy in the config file" do expected_error_message = "Unknown strategy 'other'. Available options are 'mtime' and 'digest'." allow(Shakapacker.config).to receive(:compiler_strategy).and_return("other") expect { Shakapacker::CompilerStrategy.from_config }.to raise_error(expected_error_message) end end end
Version data entries
7 entries across 7 versions & 1 rubygems