Sha256: d3aa0f4623896d49885b0c5e8adeb39dd1d7a020059579dc80e744aab8ec4279

Contents?: true

Size: 586 Bytes

Versions: 1

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

1 entries across 1 versions & 1 rubygems

Version Path
git_reflow-0.8.9 spec/lib/git_reflow/sandbox_spec.rb