promenade
promenade copied to clipboard
Refactor specs to avoid expecting implementation
What
Refactor the test suite to avoid writing tests that rely on specific implementation details (e.g. method calls).
Why
We want the test suite for these objects to be as robust as possible. The previous implementation was testing that particualr methods were called, rather than testing expected outcomes.
How
Adds RSpec matchers to make better assertions on Prometheus metrics.
Refactor to use new metrics.
Use RSpec built-in helpers where appropriate.