Skip to content

Conversation

@fatboypunk
Copy link
Contributor

Because:
When doing soap requests in tests we often find the same endpoint to be used for multiple calls. The only difference here would be the body that we send to that endpoint.

The body was already part of the matchers so adding it works, but for expect_request!'s where the body was omitted an :any was used and thus it would always match. This resulted into some tests that used this library not to find the right expectation for their request.

We've now changed the match_score so that any's will be excluded from the match score. So that a closer match with a more specific target will be used over others.

  • Review required
  • Includes 1+ tests
  • Fully tested locally

Because:
When doing soap requests in tests we often find the same endpoint to be
used for multiple calls. The only difference here would be the body that
we send to that endpoint.

The body was already part of the matchers so adding it works, but for
expect_request!'s where the body was omitted an :any was used and thus
it would always match. This resulted into some tests that used this
library not to find the right expectation for their request.

We've now changed the match_score so that any's will be excluded from
the match score. So that a closer match with a more specific target will
be used over others.
@coveralls
Copy link

coveralls commented Jan 28, 2026

Pull Request Test Coverage Report for Build 92d62a061148c2328b8df804192cf391387c76df-PR-23

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 85.531%

Totals Coverage Status
Change from base Build 9dd5f7cf2ff84a82c5b913824eed28042e7432a5: 0.03%
Covered Lines: 467
Relevant Lines: 546

💛 - Coveralls

@fatboypunk fatboypunk merged commit 30af750 into main Jan 28, 2026
2 checks passed
@fatboypunk fatboypunk deleted the marcel/match-score branch January 28, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants