[rspec-users] "should_not ==" vs "should !="
dchelimsky at gmail.com
Sat Jan 19 01:36:18 EST 2008
On Jan 18, 2008 10:47 PM, David James <davidj503 at gmail.com> wrote:
> describe "should_not == vs. should !="
> it do
> 5.should_not == 6
> end # passes
> it do
> 5.should != 6
> end # fails
> # I'm running the rspec 1.1.2 gem with the corresponding Textmate bundle
> # The second failure surprises me.
> # Is != not supported?
Sadly, yes. It is not supported. Because Ruby does not support it.
When you say 5 == 3, what that is really saying is 5.==(3), which is
how we're able to support 5.should == 3 (becomes 5.should.==(3)).
No such luck w/ !=.
C'est la vie.
> # I'd like to hear what you all think.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users