[rspec-users] understanding rspec predicates

Patrick J. Collins patrick at collinatorstudios.com
Wed Oct 12 01:56:24 EDT 2011

> > I'd rename it to something like "has_alert_flag?" or "flagged_for_alert?"
> > so I could say "model.should have_alert_flag" or "model.should
> > be_flagged_for_alert".

Ok, for whatever reason I wasn't 100% clear on this..  So the rule is, any
predicate method that starts with "has_" can be replaced with "have_", and all
others would begin with "be_".

Got it....  Thanks!

Patrick J. Collins

More information about the rspec-users mailing list