Sha256: 3b0e3ffd4c26bffc43706b4e7e56da743bd68a4affff10c267b1873b788ed9cd

Contents?: true

Size: 812 Bytes

Versions: 1

Compression:

Stored size: 812 Bytes

Contents

Given /^I have a new Subprocess instance initialized with "([^\"]*)"$/ do |command|
  @popen = Subprocess::Popen.new(command)
end

When /^I invoke the run method of said subprocess$/ do
  @popen.run
end

When /^I invoke the wait method of said subprocess$/ do
  @popen.wait
end

Then /^the instance should have a status attribute$/ do
  @popen.status.should be_a_kind_of Hash
end

Then /^the instances exit status is "([^\"]*)"$/ do |exitstatus|
  @popen.status[:exitstatus].should == exitstatus.to_i
end

Then /^the instances stdout matches "([^\"]*)"$/ do |stdout|
  @popen.stdout.should match(stdout)
end

Then /^the instances stderr matches "([^\"]*)"$/ do |stderr|
  @popen.stderr.should match(stderr)
end

Then /^the instance should have a numerical pid$/ do
  @popen.pid.should be_a_kind_of Fixnum
end



Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
subprocess-0.1.6 features/step_definitions/popen_steps.rb