[rspec-devel] [Rspec-users] subject.should_be true

David Lee david at davelee.com.au
Mon Oct 16 05:58:09 EDT 2006


thanks, Aslak. I read it.

I still think what i first did, which is that .should_be true should  
be more lax than should_equal true.

I'd expect

1.should_be true    # pass
1.should_equal true # fail

the former being equivalent to assert; the latter to assert_equal

cheers,
David Lee


On 16/10/2006, at 7:39 PM, aslak hellesoy wrote:

> 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
>>
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel



More information about the rspec-devel mailing list