Write Request Spec

Write failing RSpec request spec first then use `create-action` to implement — place at `spec/requests/` with `type: :request`, send JSON bodies with `.to_json` + `CONTENT_TYPE: application/json`, assert via `last_response.status` + `json_body`, confirm spec fails because action is unimplemented (not syntax error), test 404/422 error shapes, wrap DB specs in `"db transaction"` with ROM rollback. Covers Rack test helpers, params, response assertions, and JSON shape validation.

igmarin f29b91b 2.9 KB Updated

File contents

igmarin/hanakai-yaku/tree/main/skills/testing/write-request-spec commit f29b91b66d

Frequently asked questions

npx skillmds@latest add igmarin/write-request-spec