Sha256: a64d6948c3d836b9ca504cc47c7e0a9b011464f3d040036411b66b8d0334faba
Contents?: true
Size: 1.01 KB
Versions: 18
Compression:
Stored size: 1.01 KB
Contents
# frozen_string_literal: true describe 'GH-1047', site: true, stdio: true do before do File.write('Rules', <<EOS) compile '/*' do filter :erb write item.identifier end EOS end it 'does not reuse old content' do File.write('content/foo.md', 'I am old foo!') File.write('content/bar.md', 'I am old bar!') Nanoc::CLI.run(%w[compile]) expect(File.read('output/foo.md')).to eql('I am old foo!') expect(File.read('output/bar.md')).to eql('I am old bar!') File.write('content/foo.md', 'I am foo!') File.write('content/bar.md', '<%= @items["/foo.*"].compiled_content %><%= raise "boom" %>') expect { Nanoc::CLI.run(%w[compile]) }.to raise_error(Nanoc::Int::Errors::CompilationError) expect(File.read('output/foo.md')).to eql('I am foo!') File.write('content/bar.md', '[<%= @items["/foo.*"].compiled_content %>]') Nanoc::CLI.run(%w[compile]) expect(File.read('output/foo.md')).to eql('I am foo!') expect(File.read('output/bar.md')).to eql('[I am foo!]') end end
Version data entries
18 entries across 18 versions & 1 rubygems