test/extra/test_piper.rb in nanoc-3.6.9 vs test/extra/test_piper.rb in nanoc-3.6.10

- old
+ new

@@ -31,6 +31,18 @@ assert_equal(input, stdout.string) assert_equal('', stderr.string) end + def test_no_such_command + stdout = StringIO.new + stderr = StringIO.new + + cmd = %w( cat kafhawilgoiwaejagoualjdsfilofiewaguihaifeowuiga ) + + piper = Nanoc::Extra::Piper.new(:stdout => stdout, :stderr => stderr) + assert_raises(Nanoc::Extra::Piper::Error) do + piper.run(cmd, nil) + end + end + end