Sha256: 22f05887a8c9130a30649af7c69d7edfe8299bd6f53325ac78a5bbe94b7e7084
Contents?: true
Size: 732 Bytes
Versions: 11
Compression:
Stored size: 732 Bytes
Contents
require 'spec_helper' describe Cocaine::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
11 entries across 11 versions & 4 rubygems