Sha256: 40ccec797074e8f3a764059d9e0241428ba1da42a608c624b151c258e011739c

Contents?: true

Size: 575 Bytes

Versions: 11

Compression:

Stored size: 575 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
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
git_reflow-0.9.9 spec/lib/git_reflow/sandbox_spec.rb
git_reflow-0.9.8 spec/lib/git_reflow/sandbox_spec.rb
git_reflow-0.9.7 spec/lib/git_reflow/sandbox_spec.rb
git_reflow-0.9.6 spec/lib/git_reflow/sandbox_spec.rb
git_reflow-0.9.5 spec/lib/git_reflow/sandbox_spec.rb
git_reflow-0.9.4 spec/lib/git_reflow/sandbox_spec.rb
git_reflow-0.9.3 spec/lib/git_reflow/sandbox_spec.rb
git_reflow-0.9.2 spec/lib/git_reflow/sandbox_spec.rb
git_reflow-0.9.1 spec/lib/git_reflow/sandbox_spec.rb
git_reflow-0.9.0 spec/lib/git_reflow/sandbox_spec.rb
git_reflow-0.8.10 spec/lib/git_reflow/sandbox_spec.rb