mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@7a16e01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b8e389a0f3
commit
da7976235f
75 changed files with 940 additions and 258 deletions
|
@ -16,6 +16,14 @@ describe :numeric_step, :shared => true do
|
|||
ScratchPad.recorded.should eql [1, 2, 3, 4, 5]
|
||||
end
|
||||
|
||||
it "defaults to an infinite limit with a step size of 1 for Integers" do
|
||||
1.step.first(5).should == [1, 2, 3, 4, 5]
|
||||
end
|
||||
|
||||
it "defaults to an infinite limit with a step size of 1.0 for Floats" 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
|
||||
1.send(@method, *@step_args.call(5, 1)) { |x| x.should be_an_instance_of(Fixnum) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue