From 1924bc0602d417bc3e7cd1c15dad7e6d30dbe503 Mon Sep 17 00:00:00 2001 From: Diego Algorta Date: Thu, 28 Sep 2017 09:25:58 -0300 Subject: [PATCH] Simplify DatabaseCleaner code example for linter (#1009) The `cleaning` method already ensures cleaning and provides for a way to write better looking code. This should be 100% equivalent to previous example. --- GETTING_STARTED.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index e60dfb2..1ecae39 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -986,11 +986,8 @@ namespace :factory_girl do desc "Verify that all FactoryGirl factories are valid" task lint: :environment do if Rails.env.test? - begin - DatabaseCleaner.start + DatabaseCleaner.cleaning do FactoryGirl.lint - ensure - DatabaseCleaner.clean end else system("bundle exec rake factory_girl:lint RAILS_ENV='test'")