RailsCasts Pro episodes are now free!

Learn more or hide this

Testing Time & Web Requests

#276 Testing Time & Web Requests

Jul 25, 2011 | 8 minutes | Testing, Plugins
It can be difficult to test code that deals with the current time or an external web request. Here I show you how to do both using the Timecop and FakeWeb gems.
  • Download:
  • source codeProject Files in Zip (112 KB)
  • mp4Full Size H.264 Video (16.4 MB)
  • m4vSmaller H.264 Video (9.81 MB)
  • webmFull Size VP8 Video (10.8 MB)
  • ogvFull Size Theora Video (26 MB)