Skip to content

Instantly share code, notes, and snippets.

@thechangelog
Created February 14, 2010 03:02
Show Gist options
  • Save thechangelog/303804 to your computer and use it in GitHub Desktop.
Save thechangelog/303804 to your computer and use it in GitHub Desktop.
Feature: exit statuses
In order to specify expected exit statuses
As a developer using Cucumber
I want to use the "the exit status should be" step
Scenario: exit status of 0
When I run "ruby -h"
Then the exit status should be 0
Scenario: non-zero exit status
When I run "ruby -e 'exit 56'"
Then the exit status should be 56
Then /^the exit status should be (\d+)$/ do |exit_status|
@last_exit_status.should == exit_status.to_i
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment