Softpedia
 


SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>

WEEK'S BEST

  • Anchor CMS 0.5
  • trueDAT 4.00
  • HTML KickStart 0.91
  • WP Translate 0.6
  • Unobtrusive Google...
  • youRhere v1.4
  • slabText v1
  • Perfect Quotes 0.3.2
  • LLVM 3.0
  • -prefix-free 1.0.4
  • Home > Scripts > Development Tools > Complete applications

    Timecop 0.3.4

    Download button


    Downloads: 255  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    Website:

    License / Price:

    Platforms:

    Databases:

    Language:

    Last Updated:

    Category:
    John Trupiano | More scripts
    github.com
    MIT License 

    Windows / Linux / Mac OS / BSD / Solaris
    N/A
    Ruby
    March 13th, 2010, 10:36 GMT [view history]
    C: \ Development Tools \ Complete applications

     Read user reviews (0)  Refer to a friend  Subscribe

    Timecop description

    This is a Ruby library to work-around date settings and perform time mock tests

    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.

    Here are some key features of "Timecop":

    · 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's New in This Release: [ read full changelog ]

    · 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.



    TAGS:

    date testing | time mocking | Ruby library | date | time | mocking



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM