To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorStdout of commands which were executed
In order to specify expected output
As a developer using Cucumber
I want to use the "the output should contain" step
- Background
-
- Given
- I use a fixture named "cli-app"
- Scenarios
-
- Match output in stdout
- Match stdout on several lines
- Match output on several lines where stdout contains quotes
- Match output in stdout
-
- Given
-
a file named "bin/cli" with:
#!/usr/bin/env ruby puts "hello\nworld"
- And
-
a file named "features/output.feature" with:
Feature: Run command Scenario: Run command When I run
cli
Then the stdout should contain "hello" Then the stderr should not contain "hello" - When
-
I run
cucumber
- Then
- the features should all pass
- Match stdout on several lines
-
- Given
-
a file named "bin/cli" with:
#!/usr/bin/env ruby puts 'GET /'
- And
-
a file named "features/output.feature" with:
Feature: Run command Scenario: Run command When I run
cli
Then the stdout should contain: """ GET / """ - When
-
I run
cucumber
- Then
- the features should all pass
- Match output on several lines where stdout contains quotes
-
- Given
-
a file named "bin/cli" with:
#!/usr/bin/env ruby puts 'GET "/"'
- And
-
a file named "features/output.feature" with:
Feature: Run command Scenario: Run command When I run
cli
Then the stdout should contain: """ GET "/" """ - When
-
I run
cucumber
- Then
- the features should all pass
Last published over 7 years ago by Max Meyer.