Skip to content

Instantly share code, notes, and snippets.

@coreymcmahon
Created July 12, 2014 08:17
Show Gist options
  • Save coreymcmahon/825332b401a84df2fc43 to your computer and use it in GitHub Desktop.
Save coreymcmahon/825332b401a84df2fc43 to your computer and use it in GitHub Desktop.
Mocking the Filesystem during BDD with Behat and PHPSpec - www.slashnode.com
Feature: Configuration Files
In order to configure my application
As a developer
I need to be able to store configuration options in a file
Scenario: Getting a configured option
Given there is a configuration file
And the option 'timezone' is configured to 'UTC'
When I load the configuration file
Then I should get 'UTC' as 'timezone' option
Scenario: Getting a non-configured option with a default
Given there is a configuration file
And the option 'timezone' is not yet configured
When I load the configuration file
Then I should get default value 'CET' as 'timezone'
Scenario: Setting a configuration option
Given there is a configuration file
And the option 'timezone' is configured to 'UTC'
When I load the configuration file
And I set the 'timezone' configuration option to 'GMT'
Then I should get 'GMT' as 'timezone' option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment