[rspec-devel] subject.should_be true

David Lee david at davelee.com.au
Mon Oct 16 05:07:26 EDT 2006


First impression: it'd make sense to me that
"true".should_be true           : like assert "true"
"true".should_not_equal true    : like assert_equal

cheers,
David Lee




On 16/10/2006, at 1:50 PM, Dave Astels wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> On 15-Oct-06, at 11:31 PM, David Chelimsky 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.
>>
>> Anybody else?
>
> I remember having this discussion a while ago.
>
> I still think "should_be true" should reflect the Ruby concept of
> "true"... the principle of least surprise
>
> Dave
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (Darwin)
>
> iD8DBQFFMwGcauez/L4x7g4RAq9bAKDiWWJFsqcr8nUWf6n1X7xB8jsfsQCgphhX
> Sg/wQf4y27KrubYsXi8N6Ec=
> =says
> -----END PGP SIGNATURE-----
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel



More information about the rspec-devel mailing list