Sha256: 270d2894cf630561d2375272b56930f14e3fed9e7efbdc2f961e5af905227b7f
Contents?: true
Size: 590 Bytes
Versions: 1
Compression:
Stored size: 590 Bytes
Contents
Given /^I have a new subprocess that takes more than 5 seconds to run$/ do @popen = Subprocess::Popen.new('sleep 10', 5) end Given /^I have a new subprocess that takes less than 5 seconds to run$/ do @popen = Subprocess::Popen.new('sleep 1', 5) end When /^I invoke the run method of said subprocess with timeout$/ do @popen.run @popen.wait end Given /^I set a timeout of 5 seconds$/ do end Then /^the subprocess should exit with exitcode 1$/ do @popen.status[:exitstatus].should == 1 end Then /^the subprocess should complete fine$/ do @popen.running?.should be_false end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
subprocess-0.1.6 | features/step_definitions/popen_with_timeout_steps.rb |