Testing Time & Web Requests

Submitted by Christoph Olszowka 2011-08-01 14:28:45 UTC
Source:  http://railscasts.com/episodes/276-testing-time-web-requests

Referenced projects

Timecop

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.

Rubygem timecop

Total Downloads
5784985
Releases
37
Current Version
0.7.4
Released
2015-05-31 00:00:00 UTC
First Release
2009-03-07 05:00:00 UTC
Depends on following gems
Depending Gems
690

Github travisjeffery/timecop

Watchers
1732
Forks
107
Development activity
Less active
Last commit
2015-05-31 20:27:56 UTC

Fakeweb

FakeWeb is a helper for faking web requests in Ruby. It works at a global level, without modifying code or writing extensive stubs.

Rubygem fakeweb

Total Downloads
1636832
Releases
14
Current Version
1.3.0
Released
2010-08-22 07:00:00 UTC
First Release
2009-03-11 07:00:00 UTC
Depends on following gems
Depending Gems
1073

Github chrisk/fakeweb

Watchers
915
Forks
103
Development activity
Inactive
Last commit
2013-12-03 01:53:02 UTC
Contributors
19
Issues

VCR

VCR provides a simple API to record and replay your test suite's HTTP interactions. It works with a variety of HTTP client libraries, HTTP stubbing libraries and testing frameworks.

Rubygem vcr

Total Downloads
2964738
Releases
59
Current Version
2.9.3
Released
2014-09-08 00:00:00 UTC
First Release
2010-02-25 08:00:00 UTC
Depends on following gems
Depending Gems
1262

Github vcr/vcr

Watchers
2394
Forks
266
Development activity
Less active
Last commit
2015-06-06 17:15:37 UTC

Webmock

WebMock allows stubbing HTTP requests and setting expectations on HTTP requests.

Rubygem webmock

Total Downloads
5913742
Releases
79
Current Version
1.21.0
Released
2015-03-28 00:00:00 UTC
First Release
2009-11-20 00:00:00 UTC

Github bblimke/webmock

Watchers
1411
Forks
206
Development activity
Less active
Last commit
2014-06-22 11:34:05 UTC
×

In order to continue, you must be signed in using your Github account.

If you're signing in using this account for the first time Github will ask for your permission to give access to your public user data to the Ruby Toolbox.

Although the Github Authorization page does not mention it, the request includes read-only access to your verified email address (user:email OAuth scope). This is neccessary so there's a way to notify you about comments, information about your accepted project edits and the like. You can review your notification settings on your account page once you're signed in.