Displaying 3 results from an estimated 3 matches for "predicate_match".
2007 Mar 14
5
What''s the new syntax for predicates?
@settings.should allow_publish_ip("127.0.0.1") fails with
undefined method `allow_publish_ip'' for #<#<Class:0x2f8fd48>:0x2f5a968>
@settings.should_allow_publish_ip("127.0.0.1") works fine
This is rspec 0.8.2.
http://rspec.rubyforge.org/documentation/expectations.html says that
matching arbitrary predicates is deprecated and to see
2007 May 03
0
predicate matchers
Hey all,
If any of you are using the new predicate_matchers feature, I just
committed a change to it in trunk. See
http://rubyforge.org/tracker/index.php?func=detail&aid=10542&group_id=797&atid=3152
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...
2007 Oct 04
7
Using Predicates to look at an array..
Hi all,
I have an array of shipping_type''s being returned, and I want to see  
what is in there.  In the past I have done:
     shipping_type.include?(Cart::SHIPPING_TYPE_REGULAR).should be_true
This works, but looks really ugly..  It just doesn''t roll of the  
tongue very well.  I then looked up the use of Predicates, which I  
had been using, but hadn''t realized: