With 'rake cucumber', I get 6 failures because of getting nil exit statuses. Below is the full output. I also noticed that if I run 'cucumber features' instead, all the 55 scenarios pass. Is that expected?
(in /home/hagabaka/aruba)
Using the default profile...
Feature: Flushing output
In order to test processes that output a lot of data
As a developer using Aruba
I want to make sure that large amounts of output aren't buffered
Scenario: A little output # features/flushing.feature:7
When I run "ruby -e 'puts :a.to_s * 256'" # lib/aruba/cucumber.rb:94
Then the output should contain "a" # lib/aruba/cucumber.rb:110
And the output should be 256 bytes long # features/step_definitions/aruba_dev_steps.rb:22
And the exit status should be 0 # lib/aruba/cucumber.rb:154
expected: 0,
got: nil (using ==) (RSpec::Expectations::ExpectationNotMetError)
./lib/aruba/cucumber.rb:155:in `/^the exit status should be (\d+)$/'
features/flushing.feature:11:in `And the exit status should be 0'
Scenario: Tons of output # features/flushing.feature:13
When I run "ruby -e 'puts :a.to_s * 65536'" # lib/aruba/cucumber.rb:94
Then the output should contain "a" # lib/aruba/cucumber.rb:110
And the output should be 65536 bytes long # features/step_definitions/aruba_dev_steps.rb:22
# And the exit status should be 0
Scenario: Tons of interactive output # features/flushing.feature:19
When I run "ruby -e 'len = gets.chomp; puts :a.to_s * len.to_i'" interactively # lib/aruba/cucumber.rb:102
And I type "65536" # lib/aruba/cucumber.rb:106
Then the output should contain "a" # lib/aruba/cucumber.rb:110
And the output should be 65536 bytes long # features/step_definitions/aruba_dev_steps.rb:22
Feature: file system commands
In order to specify commands that load files
As a developer using Cucumber
I want to create temporary files
Scenario: create a dir # features/file_system_commands.feature:7
Given a directory named "foo/bar" # lib/aruba/cucumber.rb:62
When I run "ruby -e \"puts test ?d, 'foo'\"" # lib/aruba/cucumber.rb:94
Then the stdout should contain "true" # lib/aruba/cucumber.rb:187
Scenario: create a file # features/file_system_commands.feature:12
Given a file named "foo/bar/example.rb" with: # lib/aruba/cucumber.rb:66
"""
puts "hello world"
"""
When I run "ruby foo/bar/example.rb" # lib/aruba/cucumber.rb:94
Then the output should contain "hello world" # lib/aruba/cucumber.rb:110
Scenario: append to a file # features/file_system_commands.feature:20
Given a file named "foo/bar/example.rb" with: # lib/aruba/cucumber.rb:66
"""
puts "hello world"
"""
When I append to "foo/bar/example.rb" with: # lib/aruba/cucumber.rb:82
"""
puts "this was appended"
"""
When I run "ruby foo/bar/example.rb" # lib/aruba/cucumber.rb:94
Then the output should contain "hello world" # lib/aruba/cucumber.rb:110
And the output should contain "this was appended" # lib/aruba/cucumber.rb:110
Scenario: clean up files generated in previous scenario # features/file_system_commands.feature:33
When I run "ruby foo/bar/example.rb" # lib/aruba/cucumber.rb:94
Then the exit status should be 1 # lib/aruba/cucumber.rb:154
And the output should contain "No such file or directory -- foo/bar/example.rb" # lib/aruba/cucumber.rb:110
Scenario: change to a subdir # features/file_system_commands.feature:38
Given a file named "foo/bar/example.rb" with: # lib/aruba/cucumber.rb:66
"""
puts "hello world"
"""
When I cd to "foo/bar" # lib/aruba/cucumber.rb:90
And I run "ruby example.rb" # lib/aruba/cucumber.rb:94
Then the output should contain "hello world" # lib/aruba/cucumber.rb:110
Scenario: Reset current directory from previous scenario # features/file_system_commands.feature:47
When I run "ruby example.rb" # lib/aruba/cucumber.rb:94
Then the exit status should be 1 # lib/aruba/cucumber.rb:154
Scenario: Holler if cd to bad dir # features/file_system_commands.feature:51
Given a file named "foo/bar/example.rb" with: # lib/aruba/cucumber.rb:66
"""
puts "hello world"
"""
When I do aruba I cd to "foo/nonexistant" # features/step_definitions/aruba_dev_steps.rb:1
Then aruba should fail with "tmp/aruba/foo/nonexistant is not a directory" # features/step_definitions/aruba_dev_steps.rb:14
Scenario: Check for presence of a subset of files # features/file_system_commands.feature:59
Given an empty file named "lorem/ipsum/dolor" # lib/aruba/cucumber.rb:70
Given an empty file named "lorem/ipsum/sit" # lib/aruba/cucumber.rb:70
Given an empty file named "lorem/ipsum/amet" # lib/aruba/cucumber.rb:70
Then the following files should exist: # lib/aruba/cucumber.rb:223
| lorem/ipsum/dolor |
| lorem/ipsum/amet |
Scenario: Check for absence of files # features/file_system_commands.feature:67
Then the following files should not exist: # lib/aruba/cucumber.rb:227
| lorem/ipsum/dolor |
Scenario: Check for presence of a single file # features/file_system_commands.feature:71
Given an empty file named "lorem/ipsum/dolor" # lib/aruba/cucumber.rb:70
Then a file named "lorem/ipsum/dolor" should exist # lib/aruba/cucumber.rb:231
Scenario: Check for absence of a single file # features/file_system_commands.feature:75
Then a file named "lorem/ipsum/dolor" should not exist # lib/aruba/cucumber.rb:235
Scenario: Check for presence of a subset of directories # features/file_system_commands.feature:78
Given a directory named "foo/bar" # lib/aruba/cucumber.rb:62
Given a directory named "foo/bla" # lib/aruba/cucumber.rb:62
Then the following directories should exist: # lib/aruba/cucumber.rb:239
| foo/bar |
| foo/bla |
Scenario: check for absence of directories # features/file_system_commands.feature:85
Given a directory named "foo/bar" # lib/aruba/cucumber.rb:62
Given a directory named "foo/bla" # lib/aruba/cucumber.rb:62
Then the following step should fail with Spec::Expectations::ExpectationNotMetError: # features/step_definitions/aruba_dev_steps.rb:18
"""
Then the following directories should not exist:
| foo/bar/ |
| foo/bla/ |
"""
Scenario: Check for presence of a single directory # features/file_system_commands.feature:95
Given a directory named "foo/bar" # lib/aruba/cucumber.rb:62
Then a directory named "foo/bar" should exist # lib/aruba/cucumber.rb:247
Scenario: Check for absence of a single directory # features/file_system_commands.feature:99
Given a directory named "foo/bar" # lib/aruba/cucumber.rb:62
Then the following step should fail with Spec::Expectations::ExpectationNotMetError: # features/step_definitions/aruba_dev_steps.rb:18
"""
Then a directory named "foo/bar" should not exist
"""
Scenario: Check file contents # features/file_system_commands.feature:106
Given a file named "foo" with: # lib/aruba/cucumber.rb:66
"""
hello world
"""
Then the file "foo" should contain "hello world" # lib/aruba/cucumber.rb:255
And the file "foo" should not contain "HELLO WORLD" # lib/aruba/cucumber.rb:259
Scenario: Check file contents with regexp # features/file_system_commands.feature:114
Given a file named "foo" with: # lib/aruba/cucumber.rb:66
"""
hello world
"""
Then the file "foo" should match /hel.o world/ # lib/aruba/cucumber.rb:267
And the file "foo" should not match /HELLO WORLD/ # lib/aruba/cucumber.rb:271
Scenario: Remove file # features/file_system_commands.feature:122
Given a file named "foo" with: # lib/aruba/cucumber.rb:66
"""
hello world
"""
When I remove the file "foo" # lib/aruba/cucumber.rb:86
Then the file "foo" should not exist # lib/aruba/cucumber.rb:219
Feature: Interactive process control
In order to test interactive command line applications
As a developer using Cucumber
I want to use the interactive session steps
Scenario: Running ruby interactively # features/interactive.feature:7
Given a file named "echo.rb" with: # lib/aruba/cucumber.rb:66
"""
while res = gets.chomp
break if res == "quit"
puts res.reverse
end
"""
When I run "ruby echo.rb" interactively # lib/aruba/cucumber.rb:102
And I type "hello, world" # lib/aruba/cucumber.rb:106
And I type "quit" # lib/aruba/cucumber.rb:106
Then the output should contain: # lib/aruba/cucumber.rb:126
"""
dlrow ,olleh
"""
Scenario: Running a native binary interactively # features/interactive.feature:23
When I run "bc -q" interactively # lib/aruba/cucumber.rb:102
And I type "4 + 3" # lib/aruba/cucumber.rb:106
And I type "quit" # lib/aruba/cucumber.rb:106
Then the output should contain: # lib/aruba/cucumber.rb:126
"""
7
"""
Scenario: Stop processes before checking for filesystem changes # features/interactive.feature:32
See: http://github.com/aslakhellesoy/aruba/issues#issue/17 for context
Given a directory named "rename_me" # lib/aruba/cucumber.rb:62
When I run "mv rename_me renamed" interactively # lib/aruba/cucumber.rb:102
Then a directory named "renamed" should exist # lib/aruba/cucumber.rb:247
And a directory named "rename_me" should not exist # lib/aruba/cucumber.rb:251
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 # features/exit_statuses.feature:7
When I run "ruby -h" # lib/aruba/cucumber.rb:94
Then the exit status should be 0 # lib/aruba/cucumber.rb:154
Scenario: Not explicitly exiting at all # features/exit_statuses.feature:11
When I run "ruby -e '42'" # lib/aruba/cucumber.rb:94
Then the exit status should be 0 # lib/aruba/cucumber.rb:154
expected: 0,
got: nil (using ==) (RSpec::Expectations::ExpectationNotMetError)
./lib/aruba/cucumber.rb:155:in `/^the exit status should be (\d+)$/'
features/exit_statuses.feature:13:in `Then the exit status should be 0'
Scenario: non-zero exit status # features/exit_statuses.feature:15
When I run "ruby -e 'exit 56'" # lib/aruba/cucumber.rb:94
Then the exit status should be 56 # lib/aruba/cucumber.rb:154
expected: 56,
got: nil (using ==) (RSpec::Expectations::ExpectationNotMetError)
./lib/aruba/cucumber.rb:155:in `/^the exit status should be (\d+)$/'
features/exit_statuses.feature:17:in `Then the exit status should be 56'
And the exit status should not be 0 # lib/aruba/cucumber.rb:158
Scenario: Successfully run something # features/exit_statuses.feature:20
When I successfully run "ruby -e 'exit 0'" # lib/aruba/cucumber.rb:98
Exit status was . Output:
(RuntimeError)
./lib/aruba/api.rb:221:in `run_simple'
./lib/aruba/cucumber.rb:99:in `/^I successfully run "(.*)"$/'
features/exit_statuses.feature:21:in `When I successfully run "ruby -e 'exit 0'"'
Scenario: Unsuccessfully run something # features/exit_statuses.feature:23
When I do aruba I successfully run "ruby -e 'exit 10'" # features/step_definitions/aruba_dev_steps.rb:1
Then aruba should fail with "Exit status was 10" # features/step_definitions/aruba_dev_steps.rb:14
expected "Exit status was . Output:\n" to include "Exit status was 10" (RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/aruba_dev_steps.rb:15:in `/^aruba should fail with "([^"]*)"$/'
features/exit_statuses.feature:25:in `Then aruba should fail with "Exit status was 10"'
Scenario: Try to run something that doesn't exist # features/exit_statuses.feature:27
When I run "does_not_exist" # lib/aruba/cucumber.rb:94
Then the exit status should be 1 # lib/aruba/cucumber.rb:154
Feature: Output
In order to specify expected output
As a developer using Cucumber
I want to use the "the output should contain" step
Scenario: Run unknown command # features/output.feature:7
When I run "neverever gonna work" # lib/aruba/cucumber.rb:94
Then the output should contain: # lib/aruba/cucumber.rb:126
"""
No such file or directory - neverever gonna work
"""
Scenario: Detect subset of one-line output # features/output.feature:14
When I run "ruby -e 'puts \"hello world\"'" # lib/aruba/cucumber.rb:94
Then the output should contain "hello world" # lib/aruba/cucumber.rb:110
Scenario: Detect subset of one-line output # features/output.feature:18
When I run "echo 'hello world'" # lib/aruba/cucumber.rb:94
Then the output should contain "hello world" # lib/aruba/cucumber.rb:110
Scenario: Detect absence of one-line output # features/output.feature:22
When I run "ruby -e 'puts \"hello world\"'" # lib/aruba/cucumber.rb:94
Then the output should not contain "good-bye" # lib/aruba/cucumber.rb:122
Scenario: Detect subset of multiline output # features/output.feature:26
When I run "ruby -e 'puts \"hello\\nworld\"'" # lib/aruba/cucumber.rb:94
Then the output should contain: # lib/aruba/cucumber.rb:126
"""
hello
"""
Scenario: Detect subset of multiline output # features/output.feature:33
When I run "ruby -e 'puts \"hello\\nworld\"'" # lib/aruba/cucumber.rb:94
Then the output should not contain: # lib/aruba/cucumber.rb:130
"""
good-bye
"""
Scenario: Detect exact one-line output # features/output.feature:40
When I run "ruby -e 'puts \"hello world\"'" # lib/aruba/cucumber.rb:94
Then the output should contain exactly "hello world\n" # lib/aruba/cucumber.rb:134
Scenario: Detect exact multiline output # features/output.feature:44
When I run "ruby -e 'puts \"hello\\nworld\"'" # lib/aruba/cucumber.rb:94
Then the output should contain exactly: # lib/aruba/cucumber.rb:138
"""
hello
world
"""
@announce
Scenario: Detect subset of one-line output with regex # features/output.feature:54
When I run "ruby --version" # lib/aruba/cucumber.rb:94
$ cd /home/hagabaka/aruba/tmp/aruba
$ /usr/bin/ruby --version
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
Then the output should contain "ruby" # lib/aruba/cucumber.rb:110
And the output should match /ruby ([\d]+\.[\d]+\.[\d]+)(p\d+)? \(.*$/ # lib/aruba/cucumber.rb:146
@announce
Scenario: Detect subset of multiline output with regex # features/output.feature:60
When I run "ruby -e 'puts \"hello\\nworld\\nextra line1\\nextra line2\\nimportant line\"'" # lib/aruba/cucumber.rb:94
$ cd /home/hagabaka/aruba/tmp/aruba
$ /usr/bin/ruby -e 'puts "hello\nworld\nextra line1\nextra line2\nimportant line"'
hello
world
extra line1
extra line2
important line
Then the output should match: # lib/aruba/cucumber.rb:150
"""
he..o
wor.d
.*
important line
"""
@announce
Scenario: Match passing exit status and partial output # features/output.feature:71
When I run "ruby -e 'puts \"hello\\nworld\"'" # lib/aruba/cucumber.rb:94
$ cd /home/hagabaka/aruba/tmp/aruba
$ /usr/bin/ruby -e 'puts "hello\nworld"'
hello
world
Then it should pass with: # lib/aruba/cucumber.rb:162
"""
hello
"""
Scenario: Match passing exit status and exact output # features/output.feature:78
When I run "ruby -e 'puts \"hello\\nworld\"'" # lib/aruba/cucumber.rb:94
Then it should pass with exactly: # lib/aruba/cucumber.rb:166
"""
hello
world
"""
expected: 0,
got: nil (using ==) (RSpec::Expectations::ExpectationNotMetError)
./lib/aruba/api.rb:168:in `assert_exiting_with'
./lib/aruba/api.rb:163:in `assert_exit_status_and_output'
./lib/aruba/cucumber.rb:167:in `/^it should (pass|fail) with exactly:$/'
features/output.feature:80:in `Then it should pass with exactly:'
@announce-stdout
Scenario: Match failing exit status and partial output # features/output.feature:88
When I run "ruby -e 'puts \"hello\\nworld\";exit 99'" # lib/aruba/cucumber.rb:94
hello
world
Then it should fail with: # lib/aruba/cucumber.rb:162
"""
hello
"""
Scenario: Match failing exit status and exact output # features/output.feature:95
When I run "ruby -e 'puts \"hello\\nworld\";exit 99'" # lib/aruba/cucumber.rb:94
Then it should fail with exactly: # lib/aruba/cucumber.rb:166
"""
hello
world
"""
@announce-stdout
Scenario: Match failing exit status and output with regex # features/output.feature:105
When I run "ruby -e 'puts \"hello\\nworld\";exit 99'" # lib/aruba/cucumber.rb:94
hello
world
Then it should fail with regex: # lib/aruba/cucumber.rb:170
"""
hello\s*world
"""
@announce-cmd
Scenario: Match output in stdout # features/output.feature:113
When I run "ruby -e 'puts \"hello\\nworld\"'" # lib/aruba/cucumber.rb:94
$ /usr/bin/ruby -e 'puts "hello\nworld"'
Then the stdout should contain "hello" # lib/aruba/cucumber.rb:187
Then the stderr should not contain "hello" # lib/aruba/cucumber.rb:195
@announce-stderr
Scenario: Match output in stderr # features/output.feature:119
When I run "ruby -e 'STDERR.puts \"hello\\nworld\";exit 99'" # lib/aruba/cucumber.rb:94
hello
world
Then the stderr should contain "hello" # lib/aruba/cucumber.rb:179
Then the stdout should not contain "hello" # lib/aruba/cucumber.rb:199
Scenario: Detect output from all processes # features/output.feature:124
When I run "ruby -e 'puts \"hello world!\"'" # lib/aruba/cucumber.rb:94
And I run "ruby -e 'puts gets.chomp.reverse'" interactively # lib/aruba/cucumber.rb:102
And I type "hello" # lib/aruba/cucumber.rb:106
Then the output should contain exactly: # lib/aruba/cucumber.rb:138
"""
hello world!
olleh
"""
Scenario: Detect stdout from all processes # features/output.feature:135
When I run "ruby -e 'puts \"hello world!\"'" # lib/aruba/cucumber.rb:94
And I run "ruby -e 'puts gets.chomp.reverse'" interactively # lib/aruba/cucumber.rb:102
And I type "hello" # lib/aruba/cucumber.rb:106
Then the stdout should contain "hello world!\nolleh" # lib/aruba/cucumber.rb:187
And the stderr should not contain "hello world!\nolleh" # lib/aruba/cucumber.rb:195
Scenario: Detect stderr from all processes # features/output.feature:142
When I run "ruby -e 'STDERR.puts \"hello world!\"'" # lib/aruba/cucumber.rb:94
And I run "ruby -e 'STDERR.puts gets.chomp.reverse'" interactively # lib/aruba/cucumber.rb:102
And I type "hello" # lib/aruba/cucumber.rb:106
Then the stderr should contain "hello world!\nolleh" # lib/aruba/cucumber.rb:179
And the stdout should not contain "hello world!\nolleh" # lib/aruba/cucumber.rb:199
Scenario: Detect output from named source # features/output.feature:149
When I run "ruby -e 'puts :simple'" # lib/aruba/cucumber.rb:94
And I run "ruby -e 'puts gets.chomp'" interactively # lib/aruba/cucumber.rb:102
And I type "interactive" # lib/aruba/cucumber.rb:106
Then the output from "ruby -e 'puts :simple'" should contain "simple" # lib/aruba/cucumber.rb:114
And the output from "ruby -e 'puts gets.chomp'" should not contain "simple" # lib/aruba/cucumber.rb:118
Scenario: Detect stdout from named source # features/output.feature:156
When I run "ruby -e 'puts :hello'" # lib/aruba/cucumber.rb:94
And I run "ruby -e 'puts :goodbye'" # lib/aruba/cucumber.rb:94
Then the stdout from "ruby -e 'puts :hello'" should contain "hello" # lib/aruba/cucumber.rb:203
And the stderr from "ruby -e 'puts :hello'" should not contain "hello" # lib/aruba/cucumber.rb:215
And the stdout from "ruby -e 'puts :goodbye'" should not contain "hello" # lib/aruba/cucumber.rb:207
Scenario: Detect stderr from named source # features/output.feature:163
When I run "ruby -e 'STDERR.puts :hello'" # lib/aruba/cucumber.rb:94
And I run "ruby -e 'puts :goodbye'" # lib/aruba/cucumber.rb:94
Then the stderr from "ruby -e 'STDERR.puts :hello'" should contain "hello" # lib/aruba/cucumber.rb:211
And the stdout from "ruby -e 'STDERR.puts :hello'" should not contain "hello" # lib/aruba/cucumber.rb:207
And the stderr from "ruby -e 'puts :goodbye'" should not contain "hello" # lib/aruba/cucumber.rb:215
Failing Scenarios:
cucumber features/flushing.feature:7 # Scenario: A little output
cucumber features/exit_statuses.feature:11 # Scenario: Not explicitly exiting at all
cucumber features/exit_statuses.feature:15 # Scenario: non-zero exit status
cucumber features/exit_statuses.feature:20 # Scenario: Successfully run something
cucumber features/exit_statuses.feature:23 # Scenario: Unsuccessfully run something
cucumber features/output.feature:78 # Scenario: Match passing exit status and exact output
53 scenarios (6 failed, 47 passed)
152 steps (6 failed, 1 skipped, 145 passed)
1m38.137s