Skip to content

Matcher refactor

Mike Miller requested to merge matcher-refactor into release/0.8

Refactor how matchers work internally and how they are written. This makes them easier to understand and write.

Matchers have been restructured to look more like RSpec's. Some of the changes are:

  • TestExpression/TestValue/TestBlock types introduced to join test values/blocks and labels.
  • Matchers are now aware if they are negated.
  • Better abstract structure and helper methods for common types of matchers (StandardMatcher and ValueMatcher).
  • Messages and values from expectations are only produced on failures. Satisfied expectations no longer report these.
  • Removed specs for Matchers as most of the code would need to be re-written. I plan to add the tests back when using Spectator to test itself.
Edited by Mike Miller

Merge request reports