Sha256: 17ab9ae4f8b43f136563a07f0ecd9c8f1094bd9c63bdceb78475f9a47918e6fc

Contents?: true

Size: 798 Bytes

Versions: 4

Compression:

Stored size: 798 Bytes

Contents

describe 'GH-804', site: true, stdio: true do
  before do
    File.write('content/item.md', 'Stuff!')
    File.write('Rules', <<EOS)
  compile '/**/*' do
    filter :erb if item[:dynamic]
    write item.identifier.without_ext + '.html'
  end
EOS

    File.write('Checks', <<EOS)
check :donkey do
  self.add_issue('Not enough donkeys')
  self.add_issue('Too many cats', subject: '/catlady.md')
end
EOS
  end

  it 'does not crash' do
    expect { Nanoc::CLI.run(%w[check donkey]) }.to(
      raise_error(Nanoc::Int::Errors::GenericTrivial, 'One or more checks failed').and(
        output(/Issues found!\n  \(global\):\n    \[ (\e\[31m)?ERROR(\e\[0m)? \] donkey - Not enough donkeys\n  \/catlady.md:\n    \[ (\e\[31m)?ERROR(\e\[0m)? \] donkey - Too many cats\n/).to_stdout,
      ),
    )
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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