Sent from my iPhone
On Mar 9, 2009, at 1:56 PM, James Byrne <li...@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@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users