[Rspec-users] subject.should_be true

aslak hellesoy aslak.hellesoy at gmail.com
Mon Oct 16 05:39:52 EDT 2006


On 10/16/06, David Chelimsky <dchelimsky at gmail.com> wrote:
> As things stand now, the following will all pass:
>
> true.should_be true
> "true".should_be true
> "false".should_be true
> 3.should_be true
> etc
>
> My feeling is that "should_be true" should only pass if it returns
> boolean true even though ruby says that non-nil/non-false is true.
>

The old discussion about this topic is here:
http://rubyforge.org/pipermail/rspec-devel/2006-June/thread.html#228
(The "5.should.be true" thread)

I recommend reading it.

> Anybody else?
>
> David
> _______________________________________________
> Rspec-users mailing list
> Rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the Rspec-users mailing list