Hi all,
The be_true and be_false matchers pass if the actual object is the
singleton
instance of true or false respectively. e.g.
true.should be_true # passes
1.should be_true # fails
“true”.should be_true #fails
false.should be_false # passes
nil.should be_false # fails
Lighthouse - Beautifully Simple Issue Tracking suggests that
be_true should pass for anything that Ruby would evaluate as true (i.e.
anything but false or nil) and be_false would pass for anything that
Ruby
would evaluate as false (i.e. false or nil).
Please comment in that ticket if you have an opinion about this.
Cheers,
David