Sha256: 8d10123646285128538bb1503b91a44c58d2b6fdbfcf9f1c975a5489285396fa
Contents?: true
Size: 854 Bytes
Versions: 23
Compression:
Stored size: 854 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper')) describe Array do before :all do @array = [ [ :a, [ 1 ] ], [ :b, [ 2 ] ], [ :c, [ 3 ] ] ].freeze end it { @array.should respond_to(:to_hash) } describe '#to_hash' do before :all do @return = @array.to_hash end it 'should return a Hash' do @return.should be_kind_of(Hash) end it 'should return expected value' do @return.should == { :a => [ 1 ], :b => [ 2 ], :c => [ 3 ] } end end it { @array.should respond_to(:to_mash) } describe '#to_mash' do before :all do @return = @array.to_mash end it 'should return a Mash' do @return.should be_kind_of(Mash) end it 'should return expected value' do @return.should == { 'a' => [ 1 ], 'b' => [ 2 ], 'c' => [ 3 ] } end end end
Version data entries
23 entries across 22 versions & 5 rubygems
Version | Path |
---|---|
extlib-0.9.13 | spec/array_spec.rb |
extlib-0.9.12 | spec/array_spec.rb |
extlib-0.9.11 | spec/array_spec.rb |