Sha256: d6331a0767885227f94c4413b69111e4d9494bce77a10528ebeb6af222204367

Contents?: true

Size: 545 Bytes

Versions: 7

Compression:

Stored size: 545 Bytes

Contents

require 'spec_helper'
require 'dm-core/support/ext/array'
require 'dm-core/support/mash'

describe DataMapper::Ext::Array do
  before :all do
    @array = [ [ :a, [ 1 ] ], [ :b, [ 2 ] ], [ :c, [ 3 ] ] ].freeze
  end

  describe '.to_mash' do
    before :all do
      @return = DataMapper::Ext::Array.to_mash(@array)
    end

    it 'should return a Mash' do
      @return.should be_kind_of(DataMapper::Mash)
    end

    it 'should return expected value' do
      @return.should == { 'a' => [ 1 ], 'b' => [ 2 ], 'c' => [ 3 ] }
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
ardm-core-1.3.0 spec/unit/array_spec.rb
ardm-core-1.2.1 spec/unit/array_spec.rb
dm-core-1.2.1 spec/unit/array_spec.rb
ghost_dm-core-1.3.0.beta spec/unit/array_spec.rb
dm-core-1.2.0 spec/unit/array_spec.rb
dm-core-1.2.0.rc2 spec/unit/array_spec.rb
dm-core-1.2.0.rc1 spec/unit/array_spec.rb