M2 Tests
Instructions
Your team must add controller tests to your project such that your code is thoroughly tested.
- 100% Test Coverage. A statement-coverage analyses by the SimpleCov gem must report that your project’s test suite is providing 100% coverage of your controllers and models.
- Test Fixtures. Create an appropriate set of test fixtures for your controller tests to use.
- Happy and Non-Happy Paths. Write tests such that both happy paths and error paths are tested.
Recall that controller testing and statement-coverage analysis are covered in these activities:
Grading Rubric
- High-Pass:
- All instructions followed and 100% statement coverage of controllers and models achieved.
- Low-Pass:
- At least 75% statement coverage of both controllers and models achieved.
- Fail: Fails to meet requirements for Low-Pass.