Softpedia
 


SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Peardrop CMS 0.2.3
  • CommaFeed 0.0.1
  • Squash
  • Pick-a-Color 1.1.5
  • MVIS Security Center 1....
  • EasyZoom 1.0.3
  • jQueryGantt
  • IMDBPHP 2.1.8
  • Dynamic WordPress Form ...
  • PathFinding.js 0.4.1
  • Home > Scripts > Development Tools > Other Libraries

    Timecop 0.3.5

    download button


    Downloads: 384  Tell us about an update
    User Rating:
    Rated by:
    Excellent (5.0/5)
    1 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
    April 9th, 2013, 02:52 GMT [view history]
    C: \ Development Tools \ Other Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Timecop description

    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

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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