Sha256: a15ff4231ed4a62d7f7902f4160af8001f5d7489dc020186a65dbac49956047a
Contents?: true
Size: 824 Bytes
Versions: 3
Compression:
Stored size: 824 Bytes
Contents
require 'spec_helper' require 'extlib/array' 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
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
extlib-0.9.16 | spec/array_spec.rb |
extlib-0.9.15 | spec/array_spec.rb |
robsharp-extlib-0.9.15 | spec/array_spec.rb |