[rspec-users] Cucumber - RSpec matcher

David Chelimsky dchelimsky at gmail.com
Mon Mar 9 15:21:52 EDT 2009



Sent from my iPhone

On Mar 9, 2009, at 1:56 PM, James Byrne <lists at ruby-forum.com> wrote:

> Pat Maddox wrote:
>> Use should == instead of equal.  == is equality, equal is object
>> identity.  You very rarely want to use equal.
>>
>>>> "foo".equal? "foo"
>> => false
>>>> "foo" == "foo"
>> => true
>>
>> Pat
>
> Thanks.  Although, if I recall correctly then I am advised to use the
> form
>
> "x.should be == y" .

No, no, no :)

5.should == 5
6.should be > 5

Read them aloud and they.should make(:sense).

Cheers,
David


>
>
> ;->
> -- 
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users


More information about the rspec-users mailing list