Sha256: efe164a27e31c013d4a3f74c784247fea914c64e2311fbeb1e539d9f5a8320ac
Contents?: true
Size: 970 Bytes
Versions: 7
Compression:
Stored size: 970 Bytes
Contents
require_relative "spec_helper_initializer" describe "DigestStrategy" do def remove_compilation_digest_path @digest_strategy.send(:compilation_digest_path).tap do |path| path.delete if path.exist? end end before :all do @digest_strategy = Shakapacker::DigestStrategy.new remove_compilation_digest_path end after :all do remove_compilation_digest_path end it "is not fresh before compilation" do expect(@digest_strategy.stale?).to be true expect(@digest_strategy.fresh?).to be_falsy end it "is fresh after compilation" do @digest_strategy.after_compile_hook expect(@digest_strategy.stale?).to be false expect(@digest_strategy.fresh?).to be true end it "generates correct compilation_digest_path" do actual_path = @digest_strategy.send(:compilation_digest_path).basename.to_s expected_path = "last-compilation-digest-#{Shakapacker.env}" expect(actual_path).to eq expected_path end end
Version data entries
7 entries across 7 versions & 1 rubygems