A Rails application has many configuration options. Learn how to test one of them.
Well, what are the consequences of an improperly configurated application? Poor performance? Loss of revenue? Litigation? None of these consequences is desirable. We can avoid them by configuring an application correctly. And, we can be confident that it will stay that way by running examples of correct behavior against the configuration every time it's changed.
Exploring the Configuration
Rails application configuration is primarily exposed in
config/application.rb via an
Application class.  Here's an elided example.
Testing the Configuration
I've highlighted the
filter_parameters option in the file and the console. It informs the application to censor the listed request parameters from logs. Rails filters
:password by default. Let's write an example that proves
:social_security_number will be filtered.
In an editor, create a new file named
spec/config/application_spec.rb, and write the following two examples.
Run the examples, specifying the "documentation" format for output. 
Perfect. We have one passing example for
:password, and we have one failing example that indicates exactly what we need to do to correct our configuration.
config/application.rb in an editor and find the
To satisfy the failing examples, add
Rerun the examples.
filter_parameters is set as desired.
A Rails applicaton exposes its configuration via an
Application class. We can easily and simply test that the configuration is what we want it to be and that it remains that way. Thus, we can mitigate the risks, some severe, of an improperly configured application.
 Environment-specific configuration can be set in files in
 Here, pry is useful for its much nicer format than the default. It's so much more than that, though. I highly recommend adding it to your toolset. It vastly expands your capabilities to interact with Ruby code.
--format documentation option commands RSpec to display examples grouped and nested under their descriptions. Run
rspec --help for more information. If you find a set of options that you always want to use, you can add them to a
.rspec file in your home directory. See read command line configuration options from files.