O'Reilly logo

Rails 4 Test Prescriptions by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Our First Date

We’ve got part of our Project API down; now we need to use that to calculate a projected completion date. The requirement is to calculate the project’s end date based on the number of tasks finished in the last three weeks. We’ll appropriate the agile term “velocity” to describe the rate of task completion. To make this work, we need to distinguish between tasks that concluded in the last three weeks and tasks that did not.

That means we have to deal with dates.

I’m sorry.

Programming with dates and times is the worst. Time is especially problematic in testing because tests work best when each test run is identical. However, owing to the nature of the universe, the current time inexorably changes from test run to test run. This ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required