Sha256: c0c6849d24f2bf5b54a07f71010ba802d8881154e0fd77b501e3807c6778bab3

Contents?: true

Size: 627 Bytes

Versions: 4

Compression:

Stored size: 627 Bytes

Contents

describe 'GH-891', site: true, stdio: true do
  before do
    File.write('layouts/foo.erb', 'giraffes? <%= yield %>')
    File.write('Rules', <<EOS)
  preprocess do
    items.create('yes!', {}, '/hello.html')
  end

  compile '/**/*' do
    layout '/foo.*'
    write item.identifier.without_ext + '.html'
  end

  layout '/foo.*', :erb
EOS
  end

  example do
    Nanoc::CLI.run(%w[compile])
    expect(File.read('output/hello.html')).to include('giraffes?')

    File.write('layouts/foo.erb', 'donkeys? <%= yield %>')
    Nanoc::CLI.run(%w[compile])
    expect(File.read('output/hello.html')).to include('donkeys?')
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nanoc-4.7.9 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.7.8 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.7.7 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.7.6 spec/nanoc/regressions/gh_891_spec.rb