Sha256: 7a60bcbdf61e555454d75f91612d8cfbae61858328ba8a13561e8cafb9de19b8
Contents?: true
Size: 901 Bytes
Versions: 1
Compression:
Stored size: 901 Bytes
Contents
Given /^I have a new remote nonblocking subprocess that takes a long time to run$/ do @popen = Subprocess::PopenRemote.new('sleep 3 && exit 1', 'localhost', nil, 10, 'popen', :password => 'popen') @popen.should_not be_nil end When /^I invoke the run method of said nonblocking remote subprocess$/ do start_time = Time.now.to_i @popen.run @total_time = Time.now.to_i - start_time end Then /^the remote nonblocking subprocess should not block$/ do @total_time.should be_close(0, 2) end Then /^the remote nonblocking subprocess should report its run status$/ do @popen.should respond_to(:running?) end Then /^the remote nonblocking subprocess should support being waited on till complete$/ do @popen.wait end Then /^the remote nonblocking subprocess should have status info$/ do @popen.status[:exitstatus].should be_kind_of Numeric @popen.status.should be_a_kind_of Hash end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
subprocess-0.1.6 | features/step_definitions/popen_over_ssh_without_blocking_steps.rb |