promenade icon indicating copy to clipboard operation
promenade copied to clipboard

Refactor specs to avoid expecting implementation

Open Bodacious opened this issue 2 years ago • 1 comments

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.

Bodacious avatar Aug 15 '22 18:08 Bodacious