Wiki
Clone wikiCANVAS / Test Policy
Test Policy
General
Writing test for the code is mandatory.
At least, every class, module, method, function must be tested. For example test the returned value of a method is the good type, is not null, equal a specific value, etc...
Ruby
Test must be written with minitest.
Prefer assertions rather than expectations (DSL).
Documentation / tutorials:
- Assertions (YARD)
- Assertions (rdoc)
- Set up state: nice to read
- Tutorial to write test with minitest: you MUST read it until the end
Examples of unit tests can be found here.
Updated