diff options
Diffstat (limited to 'spec/ruby/core/array/minus_spec.rb')
-rw-r--r-- | spec/ruby/core/array/minus_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/array/minus_spec.rb b/spec/ruby/core/array/minus_spec.rb index 5ef90385eb..ffb8d7db06 100644 --- a/spec/ruby/core/array/minus_spec.rb +++ b/spec/ruby/core/array/minus_spec.rb @@ -46,8 +46,8 @@ describe "Array#-" do it "removes an item identified as equivalent via #hash and #eql?" do obj1 = mock('1') obj2 = mock('2') - obj1.should_receive(:hash).at_least(1).and_return(0) - obj2.should_receive(:hash).at_least(1).and_return(0) + obj1.stub!(:hash).and_return(0) + obj2.stub!(:hash).and_return(0) obj1.should_receive(:eql?).at_least(1).and_return(true) ([obj1] - [obj2]).should == [] @@ -57,8 +57,8 @@ describe "Array#-" do it "doesn't remove an item with the same hash but not #eql?" do obj1 = mock('1') obj2 = mock('2') - obj1.should_receive(:hash).at_least(1).and_return(0) - obj2.should_receive(:hash).at_least(1).and_return(0) + obj1.stub!(:hash).and_return(0) + obj2.stub!(:hash).and_return(0) obj1.should_receive(:eql?).at_least(1).and_return(false) ([obj1] - [obj2]).should == [obj1] @@ -67,7 +67,7 @@ describe "Array#-" do it "removes an identical item even when its #eql? isn't reflexive" do x = mock('x') - x.should_receive(:hash).at_least(1).and_return(42) + x.stub!(:hash).and_return(42) x.stub!(:eql?).and_return(false) # Stubbed for clarity and latitude in implementation; not actually sent by MRI. ([x] - [x]).should == [] |