Skip to content

Instantly share code, notes, and snippets.

@MarcelloDuarte
Created August 5, 2011 18:33
Show Gist options
  • Save MarcelloDuarte/1128182 to your computer and use it in GitHub Desktop.
Save MarcelloDuarte/1128182 to your computer and use it in GitHub Desktop.
md@bossa:phpspec (develop) $ behat
Feature: Developer sees help
As a developer
In order to know which cammands are available in PHPSpec
I want a command line option that displays the help
Scenario: Long option # features/developer_sees_help.feature:6
When I use the command "phpspec --help" # CommandContext::iUseTheCommand()
Then I should see # CommandContext::iShouldSee()
"""
Usage: phpspec (FILE|DIRECTORY) + [options]
-b, --backtrace Enable full backtrace
-c, --colour, --color Enable color in the output
-e, --example STRING Run examples whose full nested names include STRING
-f, --formater FORMATTER Choose a formatter
[p]rogress (default - dots)
[d]ocumentation (group and example names)
[h]tml
custom formatter class name
-h, --help You're looking at it
--fail-fast Abort the run on first failure.
--version Show version
"""
expected 'Usage: phpspec (FILE|DIRECTORY) + [options]
-b, --backtrace Enable full backtrace
-c, --colour, --color Enable color in the output
-e, --example STRING Run examples whose full nested names include STRING
-f, --formater FORMATTER Choose a formatter
[p]rogress (default - dots)
[d]ocumentation (group and example names)
[h]tml
custom formatter class name
-h, --help You\'re looking at it
--fail-fast Abort the run on first failure.
--version Show version
', got 'Usage: phpspec (FILE|DIRECTORY) + [options]
-b, --backtrace Enable full backtrace
-c, --colour, --color Enable color in the output
-e, --example STRING Run examples whose full nested names include STRING
-f, --formater FORMATTER Choose a formatter
[p]rogress (default - dots)
[d]ocumentation (group and example names)
[h]tml
custom formatter class name
-h, --help You\'re looking at it
--fail-fast Abort the run on first failure.
--version Show version
' (using be())
@MarcelloDuarte
Copy link
Author

output = $this->spec(shell_exec($command)); } ``` /** * @then /^I should see$/ */ public function iShouldSee(PyStringNode $output) { $this->output->should->be($output->getRaw()); } ``` }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment