Permalink
Browse files

Merge branch 'master' of https://github.com/aeden/aruba

  • Loading branch information...
2 parents 5c8dc32 + cff8218 commit 92f298e262c0374acc301df1b6e14b0a165c2ba8 @aslakhellesoy aslakhellesoy committed Mar 20, 2011
Showing with 19 additions and 0 deletions.
  1. +11 −0 features/exit_statuses.feature
  2. +8 −0 lib/aruba/cucumber.rb
@@ -8,6 +8,10 @@ Feature: exit statuses
When I run "ruby -h"
Then the exit status should be 0
+ Scenario: exit status of 0 with `
+ When I run `ruby -h`
+ Then the exit status should be 0
+
Scenario: Not explicitly exiting at all
When I run "ruby -e '42'"
Then the exit status should be 0
@@ -20,10 +24,17 @@ Feature: exit statuses
Scenario: Successfully run something
When I successfully run "ruby -e 'exit 0'"
+ Scenario: Successfully run something with `
+ When I successfully run `ruby -e 'exit 0'`
+
Scenario: Unsuccessfully run something
When I do aruba I successfully run "ruby -e 'exit 10'"
Then aruba should fail with "Exit status was 10"
Scenario: Try to run something that doesn't exist
When I run "does_not_exist"
Then the exit status should be 1
+
+ Scenario: Try to run something that doesn't exist with `
+ When I run `does_not_exist`
+ Then the exit status should be 1
View
@@ -95,10 +95,18 @@
run_simple(unescape(cmd), false)
end
+When /^I run `([^`]*)`$/ do |cmd|
+ run_simple(unescape(cmd), false)
+end
+
When /^I successfully run "(.*)"$/ do |cmd|
run_simple(unescape(cmd))
end
+When /^I successfully run `([^`]*)`$/ do |cmd|
+ run_simple(unescape(cmd))
+end
+
When /^I run "([^"]*)" interactively$/ do |cmd|
run_interactive(unescape(cmd))
end

0 comments on commit 92f298e

Please sign in to comment.