On Wed, Jul 20, 2011 at 10:29 AM, Jed Schneider <jed.schnei...@gmail.com>wrote:

> for comparing objects properties, which notation is considered most
> idiomatic and best practice?
>
> Thanks,
>
> Jed Schneider
>
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>

`eq` uses `==` under the hood. `eq` is the idiomatic approach for two
reasons I can think of:

1.) It is more readable
2.) It is part of the "equality" DSL: `eq`, `eql`, `equal`.

More info here:
http://relishapp.com/rspec/rspec-expectations/v/2-6/dir/built-in-matchers/equality-matchers
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to