Sha256: 92423721ffdf3274854021c84709215847af015bb00646b405e99eb503fb7de5

Contents?: true

Size: 891 Bytes

Versions: 5

Compression:

Stored size: 891 Bytes

Contents

Given %r{^a file named "([^"]+)" with:$} do |file_name, code|
  create_file(file_name, code)
end

When /^I run "([^\"]*)"$/ do |command|
  ruby command
end

Then /^the exit code should be (\d+)$/ do |exit_code|
  if last_exit_code != exit_code.to_i
    raise "Did not exit with #{exit_code}, but with #{last_exit_code}. Standard error:\n#{last_stderr}"
  end
end

Then /^the (.*) should match (.*)$/ do |stream, string_or_regex|
  written = case(stream)
    when 'stdout' then last_stdout
    when 'stderr' then last_stderr
    else raise "Unknown stream: #{stream}"
  end
  written.should smart_match(string_or_regex)
end

Then /^the (.*) should not match (.*)$/ do |stream, string_or_regex|
  written = case(stream)
    when 'stdout' then last_stdout
    when 'stderr' then last_stderr
    else raise "Unknown stream: #{stream}"
  end
  written.should_not smart_match(string_or_regex)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chatterbox-0.8.5 features/step_definitions/email_service_steps.rb
chatterbox-0.8.4 features/step_definitions/email_service_steps.rb
chatterbox-0.8.3 features/step_definitions/email_service_steps.rb
chatterbox-0.8.2 features/step_definitions/email_service_steps.rb
chatterbox-0.8.1 features/step_definitions/email_service_steps.rb