diff options
Diffstat (limited to 'spec/ruby/core/numeric/shared/step.rb')
-rw-r--r-- | spec/ruby/core/numeric/shared/step.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/core/numeric/shared/step.rb b/spec/ruby/core/numeric/shared/step.rb index 6c47cdeecb..72f33016d4 100644 --- a/spec/ruby/core/numeric/shared/step.rb +++ b/spec/ruby/core/numeric/shared/step.rb @@ -24,9 +24,9 @@ describe :numeric_step, :shared => true do 1.0.step.first(5).should == [1.0, 2.0, 3.0, 4.0, 5.0] end - describe "when self, stop and step are Fixnums" do - it "yields only Fixnums" do - @step.call(1, 5, 1) { |x| x.should be_an_instance_of(Fixnum) } + describe "when self, stop and step are Integers" do + it "yields only Integers" do + @step.call(1, 5, 1) { |x| x.should be_an_instance_of(Integer) } end describe "with a positive step" do @@ -224,7 +224,7 @@ describe :numeric_step, :shared => true do end describe "when step is a String" do - describe "with self and stop as Fixnums" do + describe "with self and stop as Integers" do it "raises an ArgumentError when step is a numeric representation" do -> { @step.call(1, 5, "1") {} }.should raise_error(ArgumentError) -> { @step.call(1, 5, "0.1") {} }.should raise_error(ArgumentError) @@ -280,7 +280,7 @@ describe :numeric_step, :shared => true do end describe "when step is a String" do - describe "with self and stop as Fixnums" do + describe "with self and stop as Integers" do it "returns an Enumerator" do @step.call(1, 5, "foo").should be_an_instance_of(Enumerator) end @@ -296,7 +296,7 @@ describe :numeric_step, :shared => true do describe "returned Enumerator" do describe "size" do describe "when step is a String" do - describe "with self and stop as Fixnums" do + describe "with self and stop as Integers" do it "raises an ArgumentError when step is a numeric representation" do -> { @step.call(1, 5, "1").size }.should raise_error(ArgumentError) -> { @step.call(1, 5, "0.1").size }.should raise_error(ArgumentError) @@ -319,7 +319,7 @@ describe :numeric_step, :shared => true do end end - describe "when self, stop and step are Fixnums and step is positive" do + describe "when self, stop and step are Integers and step is positive" do it "returns the difference between self and stop divided by the number of steps" do @step.call(5, 10, 11).size.should == 1 @step.call(5, 10, 6).size.should == 1 @@ -336,7 +336,7 @@ describe :numeric_step, :shared => true do end end - describe "when self, stop and step are Fixnums and step is negative" do + describe "when self, stop and step are Integers and step is negative" do it "returns the difference between self and stop divided by the number of steps" do @step.call(10, 5, -11).size.should == 1 @step.call(10, 5, -6).size.should == 1 |