mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@28a728b
This commit is contained in:
parent
3eb0d50c0b
commit
664e96b1de
42 changed files with 484 additions and 117 deletions
|
@ -22,6 +22,12 @@ describe :enumerable_collect, shared: true do
|
|||
multi.send(@method) {|e| e}.should == [1,3,6]
|
||||
end
|
||||
|
||||
it "only yields increasing values for a Range" do
|
||||
(1..0).send(@method) { |x| x }.should == []
|
||||
(1..1).send(@method) { |x| x }.should == [1]
|
||||
(1..2).send(@method) { |x| x }.should == [1, 2]
|
||||
end
|
||||
|
||||
it "returns an enumerator when no block given" do
|
||||
enum = EnumerableSpecs::Numerous.new.send(@method)
|
||||
enum.should be_an_instance_of(Enumerator)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue