Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Model specs should test the following:
- 1. Factories - Default factory should generate a valid object
- 1. Validations - Data should pass validations
- 1. Methods - Class and instance methods should perform as expected
- The name and location of spec files should mirror the file structure of the /app directory
- Use a *sequence* in a factory to deal with uniqueness validations
- FactoryGirl Callbacks of note:
- * before_build
- * after_build
- * before_create
- * after_create
Add Comment
Please, Sign In to add comment