Interrupting a cucumber test

Problem

When you interrupt a cucumber test, usualy by presssing Ctrl+C twice, the database tables are not truncated, so you consequently could have a problem with duplicates records.

Solution

To make sure that the database is clear before running the test again run the following tasks to clear the database and clone it again:

rake db:test:purge
rake db:test:clone