Sha256: 9114368952f2193f7a6c849f95b2efba3e39e95db2b7b1ade271d9cfe6282fd4
Contents?: true
Size: 1.18 KB
Versions: 72
Compression:
Stored size: 1.18 KB
Contents
require 'spec_helper' require 'r10k/util/subprocess' describe R10K::Util::Subprocess::Result do describe "formatting" do it "includes the exit code" do result = described_class.new(%w[/usr/bin/gti --zoom], '', '', 42) expect(result.format).to match(%r[Exit code: 42]) end describe "stdout" do it "is omitted when empty" do result = described_class.new(%w[/usr/bin/gti --zoom], '', '', 42) expect(result.format).to_not match(%r[Stdout]) end it "is included when non-empty" do result = described_class.new(%w[/usr/bin/gti --zoom], 'stuff here', '', 42) expect(result.format).to match(%r[Stdout:]) expect(result.format).to match(%r[stuff here]) end end describe "stderr" do it "is omitted when empty" do result = described_class.new(%w[/usr/bin/gti --zoom], '', '', 42) expect(result.format).to_not match(%r[Stderr]) end it "is included when non-empty" do result = described_class.new(%w[/usr/bin/gti --zoom], '', 'other stuff', 42) expect(result.format).to match(%r[Stderr:]) expect(result.format).to match(%r[other stuff]) end end end end
Version data entries
72 entries across 72 versions & 2 rubygems