Sha256: 18581081f2e3c45ec261f86fffc7faaac4d65eb8817d57f6d198873387d6da95
Contents?: true
Size: 1.3 KB
Versions: 18
Compression:
Stored size: 1.3 KB
Contents
# frozen_string_literal: true describe 'GH-1031', site: true, stdio: true do before do File.write('content/foo.md', '[<%= @items["/bar.*"].compiled_content %>]') File.write('content/bar.md', 'I am bar!') File.write('Rules', <<EOS) compile '/bar.*' do write '/bar.txt' end compile '/foo.*', rep: :default do write '/foo.txt' end compile '/foo.*', rep: :depz do filter :erb write '/foo_deps.txt' end EOS end it 'recompiles all reps of a changed item' do Nanoc::CLI.run(%w[compile]) expect(File.file?('output/bar.txt')).to be expect(File.file?('output/foo.txt')).to be expect(File.file?('output/foo_deps.txt')).to be File.write('Rules', <<EOS) compile '/bar.*' do write '/bar.txt' end compile '/foo.*', rep: :default do write '/foo-new.txt' end compile '/foo.*', rep: :depz do filter :erb write '/foo_deps.txt' end EOS Nanoc::CLI.run(%w[compile]) expect(File.file?('output/bar.txt')).to be expect(File.file?('output/foo.txt')).to be expect(File.file?('output/foo_deps.txt')).to be expect(File.read('output/foo_deps.txt')).to eq('[I am bar!]') File.write('content/bar.md', 'I am a newer bar!') Nanoc::CLI.run(%w[compile]) expect(File.read('output/foo_deps.txt')).to eq('[I am a newer bar!]') end end
Version data entries
18 entries across 18 versions & 1 rubygems