[rspec-users] should and != operator

Willy Mene wmene at stanford.edu
Mon Oct 12 14:33:41 EDT 2009


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



More information about the rspec-users mailing list