I noticed with the new shoulda releases custom macros no longer work. This is probably because of the matcher direction that shoulda is taking whilst deprecating macros...
Now, back in the day writing custom macros was fairly easy. As of today, I haven't been able to spot a single resource on how to do custom matchers in shoulda. Is it supported? And are there any tips to get started?
Cheers,
Amol
That's a reasonable question. In RSpec, you write custom matchers like this:
http://wiki.github.com/dchelimsky/rspec/custom-matchers
You're asking specifically about Test::Unit, however?
A good example might be the validate_presence_of matcher from the
Shoulda source:
You'll see they can be very straightforward. If you'd like more
information, I can try to write up a blog post about it and link to it
from the Shoulda docs.
Dan
> --
> Individuals over processes. Interactions over tools.
>
> Agile Rails training from thoughtbot, the makers of Clearance, Shoulda, & Factory Girl:
> http://thoughtbot.com/services/training
>
> The Shoulda group:
> http://groups.google.com/group/shoulda
>
> To post to this group, send email to
> sho...@googlegroups.com
>
> To unsubscribe from this group, send email to
> shoulda+u...@googlegroups.com
>