Sha256: ae811ae5a190dd086f3c8eb903bf141069b81e686f18f935215b54b007e02ce8
Contents?: true
Size: 749 Bytes
Versions: 4
Compression:
Stored size: 749 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) expect(subject.commands).to 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) expect(subject.ran?("some command")).to eq true expect(subject.ran?("no command")).to 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) expect(subject.ran?("something")).to eq true end end
Version data entries
4 entries across 3 versions & 2 rubygems