Sha256: ce0f9aae6255eff06f3643a8de0dca27ab3c1182440b80be0ea8a172dd14db43

Contents?: true

Size: 556 Bytes

Versions: 4

Compression:

Stored size: 556 Bytes

Contents

describe 'GH-1097', site: true, stdio: true do
  before do
    File.write('content/a.dat', 'foo')
    File.write('content/index.html', '<%= @items.find_all("/*.dat").flat_map(&:reps).all? { |r| File.file?(r.raw_path) } %>')
    File.write('content/z.dat', 'quux')

    File.write('Rules', <<EOS)
  compile '/**/*.html' do
    filter :erb
    write item.identifier.to_s
  end

  passthrough '/**/*.dat'
EOS
  end

  it 'generates dependency on all reps' do
    Nanoc::CLI.run(%w[compile])
    expect(File.read('output/index.html')).to eql('true')
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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