rails/rails — pull request #12633 by senny (2013-10-24 19:28:36+00:00)
Title: prevent global timezone state from leaking out of test cases.

This patch prevents leaks on the following global variables:

* `Time.zone`
* `ActiveRecord::Base.default_timezone`
* `ActiveRecord::Base.time_zone_aware_attributes`

The new helper `with_timezone_config` allows to adjust the state for a single test-case and makes sure to restore the initial state. I removed all other assignments to this global state from the test-cases.