Sha256: 5895e42022ca1de726b3c0256b0bb4ed931476b98b96d9625aadd504f22fa42d

Contents?: true

Size: 728 Bytes

Versions: 72

Compression:

Stored size: 728 Bytes

Contents

require 'spec_helper'
require 'r10k/util/subprocess'

describe R10K::Util::Subprocess::SubprocessError do
  let(:result) do
    R10K::Util::Subprocess::Result.new(%w[/usr/bin/gti --zoom], "zooming on stdout", "zooming on stderr", 42)
  end

  describe "formatting the message" do
    subject(:message) { described_class.new("Execution failed", :result => result).message }

    it "includes the exception message and formatted result" do
      expect(message).to eq(
        [
          "Execution failed:",
          "Command: /usr/bin/gti --zoom",
          "Stdout:",
          "zooming on stdout",
          "Stderr:",
          "zooming on stderr",
          "Exit code: 42",
        ].join("\n")
      )
    end
  end
end

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
r10k-3.15.0 spec/unit/util/subprocess/subprocess_error_spec.rb
akerl-r10k-3.14.2.1 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.14.2 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.14.1 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.14.0 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.13.0 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.12.1 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.12.0 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.11.0 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.10.0 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.9.3 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.9.2 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.9.1 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.9.0 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.8.0 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.7.0 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.6.0 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-2.6.9 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.5.2 spec/unit/util/subprocess/subprocess_error_spec.rb
r10k-3.5.1 spec/unit/util/subprocess/subprocess_error_spec.rb