Sha256: 2fd6cb8f6d3da02759ae017ec256c1515f3b42d7e958a5e39fe0a21da03e945c

Contents?: true

Size: 627 Bytes

Versions: 18

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

18 entries across 18 versions & 1 rubygems

Version Path
nanoc-4.7.5 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.7.4 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.7.3 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.7.2 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.7.1 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.7.0 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.6.4 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.6.3 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.6.2 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.6.1 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.6.0 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.5.4 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.5.3 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.5.2 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.5.1 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.5.0 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.4.7 spec/nanoc/regressions/gh_891_spec.rb
nanoc-4.4.6 spec/nanoc/regressions/gh_891_spec.rb