[rspec-users] How to write advanced matchers

Pat Maddox pergesu at gmail.com
Fri Nov 21 11:35:14 EST 2008

"Erik Pukinskis" <erik at snowedin.net> writes:

> * a matcher that accepts a block and passes on some information, like has_tag?
> * a matcher that can go in that block and use that information, like with_tag?
> * a mock argument matcher like is_instance_of or hash_including?
> It'd be wonderful if someone could post simple examples of how you'd
> write custom matchers of those types

I hope this doesn't come across as rude...but considering that RSpec is
open source, you just listed a bunch of examples for yourself to check
out!  Now all you have to do is look at the source for them.


More information about the rspec-users mailing list