NYULibraries/ichabod — pull request #55 by jgpawletko (2014-08-27 15:23:36+00:00)
Title: clean database before FactoryGirl.lint

We were experiencing intermittent FactoryGirl.lint failures which appeared to
have been caused by the database not being fully cleaned between test suite
executions.

Moved database clean operation before FactoryGirl.lint and followed ThoughtBot
recommendation to wrap FactoryGirl.lint in a begin/ensure/end block.

References:
https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md
http://devblog.avdi.org/2012/08/31/configuring-database_cleaner-with-rails-rspec-capybara-and-selenium/