[rspec-devel] [ rspec-Feature Requests-10542 ] reverse predicate matcher syntax

noreply at rubyforge.org noreply at rubyforge.org
Thu May 3 00:11:00 EDT 2007


Feature Requests item #10542, was opened at 2007-05-03 04:04
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10542&group_id=797

Category: expectation module
Group: None
>Status: Closed
Priority: 3
Submitted By: David Chelimsky (dchelimsky)
Assigned to: David Chelimsky (dchelimsky)
Summary: reverse predicate matcher syntax

Initial Comment:
The predicate_matcher feature released in 0.9.1 was implemented thusly:

  predicate_matchers[:method_on_object] = :method_in_example

For example:

  predicate_matchers[:can_swim?] = :swim
  Fish.should swim

A couple of people have noted that this seems backwards, or odd, so this request is to reverse the key/value:

  predicate_matchers[:swim] = :can_swim?
  Fish.should swim


----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-05-03 04:11

Message:
Fixed in trunk 1898

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=10542&group_id=797


More information about the rspec-devel mailing list