Extract matcher functionality to its own class and protocol #14

Closed
wants to merge 16 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

lukeredpath commented Mar 26, 2012

These changes are based off TrahDavid's fork (he has his own outstanding pull request).

I'm writing a library that I want to bundle some Expecta matchers with. What I really wanted to do was just provide some matcher classes that can integrate with Expecta but the existing design didn't really allow from this.

What I've done is introduce a new EXPMatcher protocol for matching. I've also created an EXPBlockDefinedMatcher class which is a concrete implementation of this protocol, and wraps the existing method of constructing matchers (moving the storage of matcher blocks out of EXPExpects).

A test case is included for this new ability and all existing tests pass. Existing matchers required no modification.

David Hart and others added some commits Mar 7, 2012

Owner

petejkim commented Mar 27, 2012

looks awesome

petejkim added a commit that referenced this pull request Mar 27, 2012

@petejkim petejkim closed this Mar 27, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment