[rspec-users] Cucumber - RSpec matcher

James Byrne lists at ruby-forum.com
Mon Mar 9 14:56:19 EDT 2009


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" .

;->
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list