README.md in yaml_properties-0.0.7 vs README.md in yaml_properties-0.0.8
- old
+ new
@@ -31,9 +31,29 @@
def self.yaml_file
ENV['SINATRA_ENV'] == 'development' ? 'config/properties.yml' : 'config/properties_production.yml'
end
end
```
+
+##Temporarily override values in e.g. cucumber
+```ruby
+
+#lib/shutl.rb
+module Shutl
+ extend YamlProperties
+end
+
+#features/support/env.rb
+After do |scenario|
+ YamlProperties.reset!
+end
+
+#features/step_definitions/egg_steps.rb
+Given /\AThere are \d+ eggs in a dozen\z/ |dozen|
+ YamlProperties.override_attribute :egg, dozen
+end
+```
+
#Yadayada
```ruby
gem 'yaml_config'
```