Suppose you have a similar YAML configuration file:
defaults: &defaults
# registration form
birth_date: true
address: true
zip: true
city: true
state: true
# other stuff
send_email_notification_to_users: true
production:
<<: *defaults
development:
<<: *defaults
test:
<<: *defaults
which is loaded in a similar way to how it is explained in Railcast #85:
http://railscasts.com/episodes/85-yaml-configuration-file
Suppose you need to test how the application performs with different settings, how would you do that?
With Django it is possible to change the settings temporarily during unit tests:
https://docs.djangoproject.com/en/dev/topics/testing/overview/#overriding-settings
Is it possible to do something similar with Rails?
In case you implemented it exactly like it is explained in Railscast #85, simply assign the new value like so:
Keep in mind that the value will not be changed back automatically after your test case finished, so it will remain valid for all subsequent test cases.