Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Updating matcher to support testing class callbacks #3
Added support for object based callbacks in addition to the already supported :symbol callbacks.
So now both of the following will work.
I am possibly using some undocumented apis, but used respond_to? to guard against api changes.
Anyway, I am sending you this pull request to get the conversation started about incorporating this if that is what you end up wanting.
Still would need to add tests and update the documentation, and it could be made to further test items on the callback class as well.
Ok, the suggested API is looking good to go.
As you said, there need to be tests and documentation for this example, you can also update the readme if you like. Concerning the implementation, I think the best way to handle the added matcher complexity is to extract it into private methods to improve readability.
Looking forward to merging this!