Sha256: 73088765040983cd3fe0d769ce43035c50834bae3a915cdae1d4a161d55b6765
Contents?: true
Size: 1.68 KB
Versions: 16
Compression:
Stored size: 1.68 KB
Contents
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
16 entries across 16 versions & 1 rubygems