Skip to content

Instantly share code, notes, and snippets.

@mikedao
Created January 22, 2015 21:57
Show Gist options
  • Save mikedao/d0d28f74cdfb99dc312e to your computer and use it in GitHub Desktop.
Save mikedao/d0d28f74cdfb99dc312e to your computer and use it in GitHub Desktop.
Advice from Ben

Don't load db.seeds in test runs

Add factory_girl (read the GETTING_STARTED.md file, at least the first half)

Build the data that each test needs in that test.

Use the 4-phase test plan: setup, exercise, verify, teardown

You can use two numbers in code: 1 and 0. The rest are constants.

Add database_cleaner gem

Actually comment in GitHub

Don't merge commented-out code

If you don't understand someone's pull, it is their fault

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment