[rspec-users] predicate matchers

David Chelimsky dchelimsky at gmail.com
Thu May 3 00:17:36 EDT 2007

Hey all,

If any of you are using the new predicate_matchers feature, I just
committed a change to it in trunk. See
for more details, but the high level is that instead of this:

  predicate_matchers[:method_on_object] = :method_in_spec

It now (as of rev 1898 - soon to be released in 0.9.2) does this:

  predicate_matchers[:method_in_spec] = :method_on_object

I (and I'm apparently not alone) think this reads better. Here's an example:

  predicate_matchers[:eat] = :eats?
  sheep.should eat('grass')
  # passes if sheep.eats?('grass')

Apologies for those of you who jumped on this feature. Hopefully it
hasn't proven itself that useful yet ;)


More information about the rspec-users mailing list