Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Warp time zones in your tests.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
MIT-LICENSE
README
Rakefile
VERSION
time-zone-warp.gemspec

README

time-zone-warp
=========

If time zone support is critical to your app, it's often necessary to test
various methods as if they were being run in a specific time zone.


Installation
============

Gem:

$ sudo gem install time-zone-warp

Gem config in a Rails app. Add to test.rb:

config.gem 'time-zone-warp', :lib => 'time_zone_warp'


Example
=======

  class UserTest < Test::Unit::TestCase
    test "code works in other time zones" do
      pretend_zone_is "Mountain Time (US & Canada)" do
        # assertions go here
      end
    end
  end


Copyright (c) 2009 Adeptware, Inc.  Released under the MIT license.
Something went wrong with that request. Please try again.