O'Reilly logo

Effective Testing with RSpec 3 by Myron Marston, Ian Dees

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

Saving Your Progress: Pending Specs

Before veering off into low-level implementation, it’s a good idea to save your work so far. We don’t recommend leaving specs in a failing state, though. So let’s mark this one as in progress. Add the following highlighted line at the top of your spec:

 it​ ​'records submitted expenses'​ ​do
» pending ​'Need to persist expenses'

Now, when you run your specs, you will get a reminder of what you were working on:

 $ ​​bundle exec rspec
 *
 
 Pending: (Failures listed here are expected and do not affect your suite's
 status)
 
  1) Expense Tracker API records submitted expenses
  # Need to persist expenses
  Failure/Error: ...

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