mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-30 02:38:47 -04:00
1.1 KiB
1.1 KiB
Notes for coding agents
UI changes
Where possible if creating a pull request, include screenshots or other visual test evidence if your changes are design oriented.
Dependencies
Do not commit or publish changes to ruby versions, gemfiles data or similar if you have had to make changes to the application to run in your sandbox environment/a user has not asked you to.
Specs
Follow the layout advice at https://www.betterspecs.org/:
- One expectation per example. Name the example for the behaviour it checks.
describefor the thing under test,contextfor a situation, phrased "when ...", "with ..." or "without ...".- Keep
itdescriptions short, and don't start them with "should". - Prefer lazy
letover instance variables andlet!/beforesetup, and usesubjectwhen the thing under test is the same across examples. - Use
described_classrather than repeating the class name. - Extract repeated behaviour into shared examples.
- Don't mark a feature spec
:jsunless it needs JavaScript. Without it the spec runs under rack_test, which is much faster than a browser.