diff options
Diffstat (limited to 'spec/ruby/core/array/combination_spec.rb')
| -rw-r--r-- | spec/ruby/core/array/combination_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/array/combination_spec.rb b/spec/ruby/core/array/combination_spec.rb index 7869783d1e..ac570687ca 100644 --- a/spec/ruby/core/array/combination_spec.rb +++ b/spec/ruby/core/array/combination_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Array#combination" do before :each do @@ -6,11 +6,11 @@ describe "Array#combination" do end it "returns an enumerator when no block is provided" do - @array.combination(2).should be_an_instance_of(Enumerator) + @array.combination(2).should.instance_of?(Enumerator) end it "returns self when a block is given" do - @array.combination(2){}.should equal(@array) + @array.combination(2){}.should.equal?(@array) end it "yields nothing for out of bounds length and return self" do @@ -30,7 +30,7 @@ describe "Array#combination" do it "yields a copy of self if the argument is the size of the receiver" do r = @array.combination(4).to_a r.should == [@array] - r[0].should_not equal(@array) + r[0].should_not.equal?(@array) end it "yields [] when length is 0" do @@ -58,7 +58,7 @@ describe "Array#combination" do @array.combination(-1).size.should == 0 [].combination(-2).size.should == 0 end - it "returns the binomial coeficient between the array size the number of combinations" do + it "returns the binomial coefficient between the array size the number of combinations" do @array.combination(5).size.should == 0 @array.combination(4).size.should == 1 @array.combination(3).size.should == 4 |
