[rspec-users] Passing self to matchers

Brandon Olivares programmer2188 at gmail.com
Mon Apr 13 03:19:21 EDT 2009


Hi,

I've noticed in several matchers that the matcher method passes self to the
constructor of the class. Then that's used to call several of the methods
used. For instance, in RouteFor, self is passed, and it is used to call
assert_recognizes.

I'm just curious why this is, and when this is required.

Brandon



More information about the rspec-users mailing list