[rspec-users] should and != operator

Aslak Hellesøy aslak.hellesoy at gmail.com
Mon Oct 12 16:18:20 EDT 2009



Den 12. okt. 2009 kl. 21.11 skrev Bret Pettichord <bret at pettichord.com>:

> Looks like an rspec bug to me.
>
It's not an rspec bug. != is not a method, and therefore can't be  
treated by rspec. It's a limitation of ruby.

Aslak
> Bret
>
> Willy Mene wrote:
>> I've tried searching around for something describing how the  
>> #should method works with the != operator, but couldn't find  
>> anything conclusive.  Can someone please explain while the  
>> following lines will pass if placed into an rspec example?
>>
>> it "should fail but passes" do
>>  [].should != []
>>  'some string'.should != 'some string'
>> end
>>
>> Thanks!
>> Willy
>>
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users


More information about the rspec-users mailing list