mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-31 11:21:06 -04:00
- Create AGENTS.md with layout advice for coding agents. - Update timeline feature spec to use rack_test driver and improve context descriptions. - Enhance spec_helper to log feature spec execution time. - Add support for Wikidata service mocking in specs.
760 B
760 B
Notes for coding agents
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.