[rspec-users] understanding rspec predicates

Pat Maddox patmaddox at me.com
Tue Oct 11 20:38:09 EDT 2011

On Oct 11, 2011, at 5:22 PM, Patrick J. Collins wrote:
> Having a spec that does:
> 	@my_model.alert_flag?.should be_true
> Seemed a little goofy to me...  So I did:

You can do

@my_model.should be_alert_flag

A custom matcher isn't worth it in this case, in my opinion.


More information about the rspec-users mailing list