Permalink
Browse files

Include DatabaseCleaner usage when demoing FactoryGirl.lint

Because built factories create associated records, the database may not
be empty when the suite is run. This encourages developers to start
DatabaseCleaner and clean after linting is complete to ensure a clean
database.
  • Loading branch information...
joshuaclayton committed Feb 13, 2014
1 parent ea03790 commit 1e8da7867ca7426906a9677a887c8a6ece2b9899
Showing with 5 additions and 0 deletions.
  1. +5 −0 GETTING_STARTED.md
View
@@ -88,11 +88,16 @@ RSpec.configure do |config|
# additional factory_girl configuration
config.before(:suite) do
+ DatabaseCleaner.start
FactoryGirl.lint
+ DatabaseCleaner.clean
end
end
```
+After calling `FactoryGirl.lint`, you'll likely want to clear out the
+database, as built factories will create associated records.
+
Defining factories
------------------

0 comments on commit 1e8da78

Please sign in to comment.