Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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