[rspec-users] should and != operator

Michael Guterl mguterl at gmail.com
Tue Oct 13 19:32:56 EDT 2009


On Mon, Oct 12, 2009 at 3:18 PM, Tero Tilus <tero at tilus.net> wrote:
> 2009-10-12 11:33, Willy Mene:
>> I've tried searching around for something describing how the #should
>> method works with the != operator
>
> Afaik it doesn't.  I have led to believe this is because there is no
> method '!='.  Expression x!=y is instead just syntactic sugar for
> !(x==y).
>

This is not true in Ruby 1.9.  You can define != separate from ==.

Best,
Michael Guterl


More information about the rspec-users mailing list