Ergomentum Rspec Matcher

Depfu Maintainability Test Coverage CircleCI

The missing rspec matchers and helpers not found somewhere else.

Array matchers

See specs for examples.

Credits

yield matchers

See specs for examples.

Performance matchers

Utilize the allocation_stats Gem. This allows to assure memory consumption. It might be useful after fixing memory holes.

See specs for examples.

Credits

Development

Create a PR to make changes. If your change is intended to release a new gem version increment the gem version in lib/ergomentum_rspec/version.rb (semantic versioning).

After your PR is merged into main the gem is build by GitHub actions and deployed to https://github.com/ergomentum/ergomentum_rspec/packages.

Build locally:

gem build ergomentum_rspec

Resources

RSpec documentation for Custom Matchers.

To inspect Rspec details look into the built in matcher implementations. As well as into the RSpec::Matchers::Composable class.

Or have a look into the the shoulda-matchers implementation work.

Blog article about the different ways to write custom matchers.