Sha256: 21ca77547f0aead0c0878f004ebe6f3c2b6ec3bc888464df1fbd780c3e2668dc

Contents?: true

Size: 372 Bytes

Versions: 20

Compression:

Stored size: 372 Bytes

Contents

require File.join(File.dirname(__FILE__), "/../../../../spec_helper.rb")

describe Mongoid::Extensions::Array::Conversions do

  describe "#mongoidize" do

    it "collects each of its attributes" do
      array = [Person.new(:title => "Sir"), Person.new(:title => "Madam")]
      array.mongoidize.should == [{ :title => "Sir" }, { :title => "Madam" }]
    end

  end

end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
durran-mongoid-0.2.0 spec/unit/mongoid/extensions/array/conversions_spec.rb
durran-mongoid-0.2.2 spec/unit/mongoid/extensions/array/conversions_spec.rb
durran-mongoid-0.2.3 spec/unit/mongoid/extensions/array/conversions_spec.rb
durran-mongoid-0.2.4 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.4.8 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.4.7 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.4.5 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.4.4 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.4.3 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.4.2 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.4.1 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.4.0 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.3.4 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.3.3 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.3.2 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.3.1 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.3.0 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.2.7 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.2.6 spec/unit/mongoid/extensions/array/conversions_spec.rb
mongoid-0.2.5 spec/unit/mongoid/extensions/array/conversions_spec.rb