spec/pair_spec.rb in totally_lazy-0.0.4 vs spec/pair_spec.rb in totally_lazy-0.0.5

- old
+ new

@@ -1,7 +1,6 @@ -require 'rspec' -require_relative '../lib/totally_lazy' +require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe 'Pair' do it 'should return the first item: first/key' do expect(pair(1, 2).first).to eq(1) @@ -33,8 +32,12 @@ expect(pair('1', '2').to_i).to eq({1 => 2}) end it 'should convert to float' do expect(pair('1', '2').to_f).to eq({1.0 => 2.0}) + end + + it 'should support each' do + expect(pair(1,2).each{|x| x }).to eq([1,2]) end end \ No newline at end of file