Sha256: 57e7e75b11e063f50c23bb2715ab5a3beb88b0c232e7776ebde1f5efb60c95b4
Contents?: true
Size: 1.75 KB
Versions: 18
Compression:
Stored size: 1.75 KB
Contents
# frozen_string_literal: true describe 'Partial recompilation', site: true, stdio: true do before do File.write('content/foo.md', "---\ntitle: hello\n---\n\nfoo") File.write('content/bar.md', '<%= @items["/foo.*"].compiled_content %><% raise "boom" %>') File.write('Rules', <<~EOS) compile '/foo.*' do write '/foo.html' end compile '/bar.*' do filter :erb write '/bar.html' end EOS end example do expect(File.file?('output/foo.html')).not_to be expect(File.file?('output/bar.html')).not_to be expect { Nanoc::CLI.run(%w[show-data --no-color]) } .to(output(/^item \/foo\.md, rep default:\n is outdated:/).to_stdout) expect { Nanoc::CLI.run(%w[show-data --no-color]) } .to(output(/^item \/bar\.md, rep default:\n is outdated:/).to_stdout) expect { Nanoc::CLI.run(%w[compile --verbose]) rescue nil } .to output(/create.*output\/foo\.html/).to_stdout expect { Nanoc::CLI.run(%w[show-data --no-color]) } .to(output(/^item \/foo\.md, rep default:\n is not outdated/).to_stdout) expect { Nanoc::CLI.run(%w[show-data --no-color]) } .to(output(/^item \/bar\.md, rep default:\n is outdated:/).to_stdout) expect(File.file?('output/foo.html')).to be expect(File.file?('output/bar.html')).not_to be File.write('content/bar.md', '<% raise "boom" %>') expect { Nanoc::CLI.run(%w[compile --verbose --debug]) rescue nil } .to output(/skip.*output\/foo\.html/).to_stdout expect { Nanoc::CLI.run(%w[show-data --no-color]) } .to(output(/^item \/foo\.md, rep default:\n is not outdated/).to_stdout) expect { Nanoc::CLI.run(%w[show-data --no-color]) } .to(output(/^item \/bar\.md, rep default:\n is outdated:/).to_stdout) end end
Version data entries
18 entries across 18 versions & 1 rubygems