-
-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes old use of instance variable #341
- Loading branch information
Dennis Günnewig
committed
Jan 25, 2016
1 parent
5f91220
commit 9cf22ae
Showing
3 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Feature: Access STDERR of command | ||
|
||
You may need to `#stop_all_commands` before accessing `#stderr` of a single | ||
command - e.g. `#last_command_started`. | ||
|
||
Background: | ||
Given I use a fixture named "cli-app" | ||
And the default aruba io wait timeout is 1 seconds | ||
|
||
Scenario: Existing executable | ||
Given an executable named "bin/cli" with: | ||
"""bash | ||
#!/bin/bash | ||
echo 'Hello, Aruba!' >&2 | ||
""" | ||
And a file named "spec/run_spec.rb" with: | ||
"""ruby | ||
require 'spec_helper' | ||
RSpec.describe 'Run command', :type => :aruba do | ||
before(:each) { run('cli') } | ||
before(:each) { stop_all_commands } | ||
it { expect(last_command_started.stderr).to start_with 'Hello' } | ||
end | ||
""" | ||
When I run `rspec` | ||
Then the specs should all pass | ||
|
||
Scenario: Waiting for output to "appear" after 2 seconds | ||
Given an executable named "bin/cli" with: | ||
"""bash | ||
#!/bin/bash | ||
sleep 1 | ||
echo 'Hello, Aruba' >&2 | ||
""" | ||
And a file named "spec/run_spec.rb" with: | ||
"""ruby | ||
require 'spec_helper' | ||
RSpec.describe 'Run command', :type => :aruba, :io_wait_timeout => 2 do | ||
before(:each) { run('cli') } | ||
it { expect(last_command_started.stderr).to start_with 'Hello' } | ||
end | ||
""" | ||
When I run `rspec` | ||
Then the specs should all pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Feature: Access STDOUT of command | ||
|
||
You may need to `#stop_all_commands` before accessing `#stdout` of a single | ||
command - e.g. `#last_command_started`. | ||
|
||
Background: | ||
Given I use a fixture named "cli-app" | ||
And the default aruba io wait timeout is 1 seconds | ||
|
||
Scenario: Existing executable | ||
Given an executable named "bin/cli" with: | ||
"""bash | ||
#!/bin/bash | ||
echo 'Hello, Aruba!' | ||
""" | ||
And a file named "spec/run_spec.rb" with: | ||
"""ruby | ||
require 'spec_helper' | ||
RSpec.describe 'Run command', :type => :aruba do | ||
before(:each) { run('cli') } | ||
before(:each) { stop_all_commands } | ||
it { expect(last_command_started.stdout).to start_with 'Hello' } | ||
end | ||
""" | ||
When I run `rspec` | ||
Then the specs should all pass | ||
|
||
Scenario: Waiting for output to "appear" after 2 seconds | ||
Given an executable named "bin/cli" with: | ||
"""bash | ||
#!/bin/bash | ||
sleep 1 | ||
echo 'Hello, Aruba' | ||
""" | ||
And a file named "spec/run_spec.rb" with: | ||
"""ruby | ||
require 'spec_helper' | ||
RSpec.describe 'Run command', :type => :aruba, :io_wait_timeout => 2 do | ||
before(:each) { run('cli') } | ||
it { expect(last_command_started.stdout).to start_with 'Hello' } | ||
end | ||
""" | ||
When I run `rspec` | ||
Then the specs should all pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters