Sha256: 51bdcc14fae3c5c83375bef4021800b3528d1d6489ac06bf1cf992d3dffce2c8

Contents?: true

Size: 283 Bytes

Versions: 4

Compression:

Stored size: 283 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe Hash do
  describe '.[]' do
    it "should accept an Array argument (Ruby 1.8.6 and older)" do
      list = [['foo', 'bar'], ['foo2', 'bar2']]
      Hash[list].should == {'foo' => 'bar', 'foo2' => 'bar2'}
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yard-0.5.2 spec/core_ext/hash_spec.rb
yard-0.5.1p1 spec/core_ext/hash_spec.rb
yard-0.5.1 spec/core_ext/hash_spec.rb
yard-0.5.0 spec/core_ext/hash_spec.rb