Sha256: 8f27e92be1633c044cec26182f644312030c71e700e0c99dbeb5057628e72651

Contents?: true

Size: 941 Bytes

Versions: 4

Compression:

Stored size: 941 Bytes

Contents

require 'aruba-doubles'

World(ArubaDoubles)

Before do
  ArubaDoubles::Double.setup
end

After do
  ArubaDoubles::Double.teardown
end

Given /^I double `([^`]*)`$/ do |cmd|
  double_cmd(cmd)
end

Given /^I double `([^`]*)` with "([^"]*)"$/ do |cmd, stdout|
  double_cmd(cmd, :puts => stdout)
end

Given /^I double `([^`]*)` with stdout:$/ do |cmd, stdout|
  double_cmd(cmd, :puts => stdout)
end

Given /^I double `([^`]*)` with exit status (\d+) and stdout:$/ do |cmd, exit_status, stdout|
  double_cmd(cmd, :puts => stdout, :exit => exit_status.to_i)
end

Given /^I double `([^`]*)` with stderr:$/ do |cmd, stderr|
  double_cmd(cmd, :warn => stderr)
end

Given /^I double `([^`]*)` with exit status (\d+) and stderr:$/ do |cmd, exit_status, stderr|
  double_cmd(cmd, :warn => stderr, :exit => exit_status.to_i)
end

Given /^I double `([^`]*)` with exit status (\d+)$/ do |cmd, exit_status|
  double_cmd(cmd, :exit => exit_status.to_i)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
aruba-doubles-1.1.1 lib/aruba-doubles/cucumber.rb
aruba-doubles-1.1.0 lib/aruba-doubles/cucumber.rb
aruba-doubles-1.0.1 lib/aruba-doubles/cucumber.rb
aruba-doubles-1.0.0 lib/aruba-doubles/cucumber.rb