Timecop

Software Screenshot:
Timecop
Software Details:
Version: 0.7.3
Upload Date: 24 Feb 15
Developer: John Trupiano
Distribution Type: Freeware
Downloads: 66

Rating: 3.0/5 (Total Votes: 1)

It simulates Time.now, DateTime.now and Date.today in a single call.

It is mainly used to run a time-sensitive test or to set the time for the test environment.

Features:

  • Freeze time to a specific point.
  • Travel back to a specific point in time, but allow time to continue moving forward from there.
  • No dependencies, can be used with any ruby project
  • Timecop api allows arguments to be passed into #freeze and #travel as one of the following: Time instance, DateTime instance, Date instance, individual arguments (year, month, day, hour, minute, second), a single integer argument that is interpreted as an offset in seconds from Time.now
  • Nested calls to Timecop#travel and Timecop#freeze are supported - each block will maintain its interpretation of now.

What is new in this release:

  • Fix various timezone-related issues. Notably, when traveling to a DateTime instance specified in a non-local timezone, convert provided DateTime instance to a local instance and return that from DateTime.now.
  • Fix bug that would not allow Timecop to be used when Ruby's ‘date' library had not been previously loaded.
  • Fix bug when traveling to a DateTime across a DST boundary that resulted in DateTime's being off by an hour.
  • Migrate argument parsing into Timecop::TimeStackItem to reduce the responsibility of the Timecop class.

Similar Software

Apache Tika
Apache Tika

20 Jul 15

tileJs
tileJs

13 May 15

Hamlet
Hamlet

6 Mar 16

Comments to Timecop

Comments not found
Add Comment
Turn on images!