by dchelimsky · 15y ago · 0 comments
i.porkchop_sandwiches.count.should eq(1).
Then for object identity you can still use be: i.porkchop_sandwiches.first.should be(my_sandwich)
This is actually more in line with the original RSpec, which had should_equal and should_be, and I prefer it because you eliminate the warning, and (I think that) "1.should eq(1)" actually speaks better than "1.should == 1" for someone familiar with ruby but new to RSpec.Naturally this is a matter of opinion, but it's testament to your fine work with RSpec (and particularly in the recent modularization work) that it deals deftly with differing opinions without putting anyone at a serious disadvantage.
The other operators are still supported as/is and don't cause the warning that == does.