diff options
Diffstat (limited to 'spec/ruby/core/enumerator/lazy/map_spec.rb')
-rw-r--r-- | spec/ruby/core/enumerator/lazy/map_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/ruby/core/enumerator/lazy/map_spec.rb b/spec/ruby/core/enumerator/lazy/map_spec.rb new file mode 100644 index 0000000000..8ff2573fe5 --- /dev/null +++ b/spec/ruby/core/enumerator/lazy/map_spec.rb @@ -0,0 +1,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 |