Sha256: 3dc66178182843a3a5c075343db6fcc82ae31d5190286b3244508ff7d00d956b

Contents?: true

Size: 586 Bytes

Versions: 2

Compression:

Stored size: 586 Bytes

Contents

require 'spec_helper'

RSpec.describe GitReflow::Sandbox do
  describe ".run" do
    it "is blocking by default when the command exits with a failure" do
      allow(GitReflow::Sandbox).to receive(:run).and_call_original
      expect { GitReflow::Sandbox.run("ls wtf") }.to raise_error SystemExit, "\`ls wtf\` failed to run."
    end

    it "when blocking is flagged off, the command exits silently" do
      allow(GitReflow::Sandbox).to receive(:run).and_call_original
      expect { GitReflow::Sandbox.run("ls wtf", blocking: false) }.to_not raise_error SystemExit
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
git_reflow-0.8.8 spec/lib/git_reflow/sandbox_spec.rb
git_reflow-0.8.7 spec/lib/git_reflow/sandbox_spec.rb