Sha256: 72c96e642c03d3e38125e603ac29aa0949a60ea05e9aa9e4082289fd23e8a9b8

Contents?: true

Size: 733 Bytes

Versions: 2

Compression:

Stored size: 733 Bytes

Contents

require 'spec_helper'

describe Terrapin::CommandLine::FakeRunner do
  it 'records commands' do
    subject.call("some command", :environment)
    subject.call("other command", :other_environment)
    subject.commands.should eq [["some command", :environment], ["other command", :other_environment]]
  end

  it 'can tell if a command was run' do
    subject.call("some command", :environment)
    subject.call("other command", :other_environment)
    subject.ran?("some command").should eq true
    subject.ran?("no command").should eq false
  end

  it 'can tell if a command was run even if shell options were set' do
    subject.call("something 2>/dev/null", :environment)
    subject.ran?("something").should eq true
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
terrapin-0.6.0 spec/terrapin/command_line/runners/fake_runner_spec.rb
terrapin-0.6.0.alpha spec/terrapin/command_line/runners/fake_runner_spec.rb