"Mark Wilden" <[EMAIL PROTECTED]> writes: > I expected 'should !=' to act the same as 'should_not =='. That turned out to > be incorrect (by design?): > > require 'spec' > require 'spec/rails' > > describe "using 'should !='" do > it "seems to treat != as the same as ==" do > 1.should != 1 # passes > 1.should != 2 # fails > end > end
Sorry for the short message, but yeah this is known. You can search the mailing list archives and the tracker for other emails. Basically, Ruby doesn't let us do this, because it translates should != 1 into !(should == 1) and since (should == 1) is a passing expectation, the thing passes. You can get around it by using paresetree or a similar technique but it's sloooooooow thus has not become a part of rspec. Pat _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users