Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-5262

Implement local time zone override for tests

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 8.1.0
    • Affects Version/s: None
    • Component/s: Tests
    • None

      Similarly to how there is config_override to override configuration options, we should also add a time_zone_override for setting Time.zone locally for a test to avoid this code:

              before do
                # if this is actually your time zone, the following tests are useless
                Time.zone = "Stockholm"
              end
      
              after do
                Time.zone = nil
              end
      

            Assignee:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: