doorkeeper-gem/doorkeeper — pull request #528 by caike (2014-12-17 17:21:44+00:00)
Title: Guarantee consistent state when changing config.

When changing application configuration options for test runs, I've found it's best to do it in a way that ensures the original state is rolled back to no matter what.

This refactoring guarantees the application is not left in an inconsistent state in case an error is raised during the test run - more specifically as part of the call to `post "/oauth/authorize..."`.