Sha256: 4246568e3dd22b1fe4d103c9ce5e948a05fb0b14d1847a0827da36bc9335337b

Contents?: true

Size: 522 Bytes

Versions: 1

Compression:

Stored size: 522 Bytes

Contents

require 'test/unit'

require 'rubygems'
gem "activesupport", ">= 2.1.0"
require 'activesupport'

require File.join(File.dirname(__FILE__), '..', 'lib', 'timecop')

class TestTimecopWithRails < Test::Unit::TestCase
  
  def test_travel_changes_and_resets_time
    Time.zone = 'Eastern Time (US & Canada)'
    t = Time.zone.local(2008, 10, 10, 10, 10, 10)
    assert_not_equal t, Time.now
    Timecop.travel(2008, 10, 10, 10, 10, 10) do
      assert_equal t, Time.now
    end
    assert_not_equal t, Time.now
  end
    
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
timecop-0.1.0 test/test_timecop_with_rails.rb