Testing
RSpec Custom Matchers: Write Your Own Readable Assertions
When tests contain domain concepts that don't map cleanly to built-in RSpec matchers, the result is verbose assertions that reveal implementation rather than intent. Custom matchers let you express what the test means rather than how it works. A matcher like be_a_valid_invoice communicates more