timecop - A gem providing "time travel", "time freezing", and "time acceleration" capabilities, making it simple to test time-dependent code

  •        50

A gem providing "time travel" and "time freezing" capabilities, making it dead simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call. Let's say you want to test a "live" integration wherein entire days could pass by in minutes while you're able to simulate "real" activity. For example, one such use case is being able to test reports and invoices that run in 30 day cycles in very little time, while also being able to simulate activity via subsequent calls to your application.

https://github.com/travisjeffery/timecop

Tags
Implementation
License
Platform

   




Related Projects

jtrupiano-timecop

  •    Ruby

A gem providing “time travel” and “time freezing” capabilities, making it dead simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.

spork - A DRb server for testing frameworks (RSpec / Cucumber currently) that forks before each run to ensure a clean testing state

  •    Ruby

Spork is Tim Harper's implementation of test server (similar to the script/spec_server that used to be provided by rspec-rails), except rather than using the Rails constant unloading to reload your files, it forks a copy of the server each time you run your tests. The result? Spork runs more solid: it doesn't get corrupted over time, it can work with any ruby framework, and it properly handles modules and any voodoo meta programming you may have put in your app. Spork runs on POSIX systems using fork. It also runs on windows by pre-populating a pool of ready processes (referred to here as the “magazine” strategy).

ClangFormat-Xcode - Xcode plug-in to to use clang-format from in Xcode and consistently format your code with Clang

  •    Objective-C

An Xcode plug-in to format your code using Clang's format tools, by @travisjeffery. With clang-format you can use Clang to format your code to styles such as LLVM, Google, Chromium, Mozilla, WebKit, or your own configuration.

rspec-rails-examples - RSpec cheatsheet & Rails app: Learn how to expertly test Rails apps from a model codebase

  •    Ruby

A small yet comprehensive reference for developers who want to know how to test Rails apps using RSpec. Here you'll find in-depth examples with detailed documentation explaining how to test with RSpec and related testing gems, which you can then apply to your own projects.


spring - Rails application preloader

  •    Ruby

Spring is a Rails application preloader. It speeds up development by keeping your application running in the background so you don't need to boot it every time you run a test, rake task or migration.Spring makes extensive use of Process.fork, so won't be able to provide a speed up on platforms which don't support forking (Windows, JRuby).

commands - Run Rake/Rails commands through the console

  •    Ruby

Run Rake and Rails commands during a development console session and run tests during a test console session. This side-steps the need to load the entire environment over and over again when you run these commands from the shell. This constant reloading of the environment is what causes slow boot time on big applications. Think of this like a baby Zeus or the Turbolinks of commands.You can see the options available for all the commands by running them with no parameters.

sextant - find your route on a long journey over Rails with Sextant

  •    Ruby

Helps you find your routes on a long Journey on Rails, in Rails apps 3.2+. Running rake routes is slow and painful, mostly due to the time to initialize rails. When you're working in development you likely have your rails server booted, you can save this time by rendering the routes in a web request. You can only develop as quick as your tools will allow, so speeding up your tools speeds your development. Sextant allows you to quickly see your routes.

TUDelorean - TUDelorean helps you test your time-dependent Objetive-C code allowing you travel anywhere in time

  •    Objective-C

A DeLorean helps you test your time-dependent code allowing you travel anywhere in time. This simple class provides several class methods to perform diferent time mannipulations that will modify the behaviour of NSDate instances and how time advances during the span the manipulation effects are enabled.

konacha - Test your Rails application's JavaScript with the mocha test framework and chai assertion library

  •    Ruby

Konacha ([koh-NAH-cha], a type of green tea) is a Rails engine that allows you to test your JavaScript with the Mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines.

capybara - Acceptance test framework for web applications

  •    Ruby

Capybara helps you test web applications by simulating how a real user would interact with your app. It is agnostic about the driver running your tests and comes with Rack::Test and Selenium support built in. WebKit is supported through an external gem. If you need to test JavaScript, or if your app interacts with (or is located at) a remote URL, you'll need to use a different driver. If using Rails 5.0+, but not using the Rails system tests from 5.1, you'll probably also want to swap the "server" used to launch your app to Puma in order to match Rails defaults.

timekeeper - Easy testing of time-dependent code. Node.js

  •    Javascript

This module mocks Date and Date.now in order to help you test time-dependent code. Provides travel and freeze functionality for your Node.js tests. Note: If traveling when time is frozen, the time will be frozen to the new traveled time.

crono - A time-based background job scheduler daemon (just like Cron) for Rails

  •    Ruby

Crono is a time-based background job scheduler daemon (just like Cron) for Ruby on Rails. Currently, there is no such thing as Ruby Cron for Rails. Well, there's Whenever but it works on top of Unix Cron, so you can't manage it from Ruby. Crono is pure Ruby. It doesn't use Unix Cron and other platform-dependent things. So you can use it on all platforms supported by Ruby. It persists job states to your database using Active Record. You have full control of jobs performing process. It's Ruby, so you can understand and modify it to fit your needs.

render_sync - Real-time Rails Partials

  •    Ruby

This started as a thought experiment that is growing into a viable option for realtime Rails apps without ditching the standard rails stack that we love and are so productive with for a heavy client side MVC framework. Real-time partials with Rails. Sync lets you render partials for models that, with minimal code, update in realtime in the browser when changes occur on the server.

active_reload - Reload Rails code in development mode only when change is deteced

  •    Ruby

Active Reload is a gem that changes a little when Rails code reloading is executed. Normally Rails "forgets" your code after every request in development mode and loads again necessary files during the request. If your application is big this can take lot of time especially on "dashboard" page that uses lot of different classes. However this constant reloading is not always necessary. This gem changes it so it occurs before request and only when file was changed or added. It won't make reloading your app faster but it will skip reloading when nothing changed and that saved second can really sum up to a big value. It means that after change first request in development mode will reload the code and take as much time as it takes without this gem but subsequent request will be faster until next changes due to lack of code reloading.

ttnt - Test This, Not That! (Google Summer of Code 2015 project under Ruby on Rails)

  •    Ruby

Started as a Google Summer of Code 2015 project with mentoring organization Ruby on Rails, with idea based on Aaron Patterson's article "Predicting Test Failures". rails/rails has a problem that CI builds take hours to finish. This project aims to solve that problem by making it possible to run only tests related to changes introduced in target commits/branches/PRs.

combustion - Simple, elegant testing for Rails Engines

  •    Ruby

Combustion is a library to help you test your Rails Engines in a simple and effective manner, instead of creating a full Rails application in your spec or test folder. It allows you to write your specs within the context of your engine, using only the parts of a Rails app you need.

testlink-code - TestLink Open Source Test & Requirement Management System

  •    PHP

TestLink is a web based test management and test execution system. It enables quality assurance teams to create and manage their test cases as well as to organize them into test plans. These test plans allow team members to execute test cases and track test results dynamically. In an ideal world, testing would be a pretty straightforward process. A test team takes the product requirements, writes a test specification document, reviews the tests, and then runs them all for each version of the product. The team is composed of full-time staff, and everyone knows exactly what is expected of them.

active_scaffold - Save time and headaches, and create a more easily maintainable set of pages, with ActiveScaffold

  •    Ruby

ActiveScaffold provides a quick and powerful user interfaces for CRUD (create, read, update, delete) operations for Rails applications. It offers additonal features including searching, pagination & layout control. Rails >= 4.0.5 is supported, ruby >= 2.1 supported, although it should work with ruby >= 2.0.0, it's too old and not tested. Ruby < 2.0.0 won't work. 3-4-stable supports rails >= 3.2.x and ruby >= 1.9.3 3-3-stable supports rails >= 3.2.x and ruby >= 1.8 rails-3.2 supports Rails 3.1 & 3.2, and is the current source of the 3.2.x line of gems.

teaspoon - Teaspoon: Javascript test runner for Rails

  •    Javascript

Teaspoon is a Javascript test runner built for Rails. It can run tests in the browser and headless using PhantomJS, Selenium WebDriver, or Capybara Webkit. It can also run your tests on selenium-webgrid providers such as BrowserStack. The goal of Teaspoon is to be simple to use while also providing the most complete Javascript testing solution for Rails.