summaryrefslogtreecommitdiff
path: root/spec/ruby/core/enumerator/lazy/map_spec.rb
blob: 8ff2573fe5802b769515f5dc018bee1630218df5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# -*- encoding: us-ascii -*-

require File.expand_path('../../../../spec_helper', __FILE__)
require File.expand_path('../shared/collect', __FILE__)

describe "Enumerator::Lazy#map" do
  it_behaves_like :enumerator_lazy_collect, :map

  it "doesn't unwrap Arrays" do
    Enumerator.new {|y| y.yield([1])}.lazy.to_a.should == [[1]]
  end
end