Sha256: 474497cc8ee4552160dc0d6dda7dbb5f46f1c2441044cac1b7f209d2f6525820
Contents?: true
Size: 679 Bytes
Versions: 18
Compression:
Stored size: 679 Bytes
Contents
# frozen_string_literal: true describe 'GH-885', site: true, stdio: true do before do File.write( 'content/index.html', "<%= @items['/hello.*'].compiled_content %> - <%= Time.now.to_f %>", ) File.write('Rules', <<EOS) preprocess do items.create('hi!', {}, '/hello.html') end compile '/**/*' do filter :erb write item.identifier.without_ext + '.html' end EOS end example do Nanoc::CLI.run(%w[compile]) before = File.read('output/index.html') sleep(0.1) Nanoc::CLI.run(%w[compile]) after = File.read('output/index.html') expect(after).to eql(before) expect(after).to match(/\Ahi! - \d+/) end end
Version data entries
18 entries across 18 versions & 1 rubygems