Upgrading to Mongoid 2.0 beta 11 and fixing specs

This commit is contained in:
Jacques Crocker 2010-07-25 19:49:35 -07:00
parent eb82548452
commit c6240dd7eb
4 changed files with 7 additions and 16 deletions

View File

@ -7,8 +7,7 @@ gem 'rails', '3.0.0.beta4'
gem 'liquid', '2.0.0'
gem 'bson_ext', '>= 1.0.1'
gem 'mongo_ext'
gem 'mongoid-locomotive'
# gem 'mongoid', "2.0.0.beta11"
gem 'mongoid', "2.0.0.beta11"
gem 'mongoid_acts_as_tree', '0.1.5'
gem 'mongo_session_store', '2.0.0.pre'
gem 'warden'

View File

@ -137,14 +137,6 @@ GEM
mongo (~> 1.0.5)
tzinfo (~> 0.3.22)
will_paginate (~> 3.0.pre)
mongoid-locomotive (2.0.0.beta9)
activemodel (~> 3.0.0.beta)
bson (~> 1.0.4)
bson_ext (~> 1.0.4)
bundler
mongo (~> 1.0.5)
tzinfo (~> 0.3.22)
will_paginate (~> 3.0.pre)
mongoid_acts_as_tree (0.1.5)
bson (>= 0.20.1)
mongoid (<= 2.0.0)
@ -249,7 +241,7 @@ DEPENDENCIES
mocha!
mongo_ext
mongo_session_store (= 2.0.0.pre)
mongoid-locomotive
mongoid (= 2.0.0.beta11)
mongoid_acts_as_tree (= 0.1.5)
mongrel
mongrel_experimental

View File

@ -116,7 +116,7 @@ describe AssetCollection do
it 'should add new field' do
@collection.asset_custom_fields.build :label => 'Active at', :name => 'active_at', :kind => 'Date'
@collection.upsert(false)
@collection.upsert(:validate => false)
@collection.reload
asset = @collection.assets.first
lambda { asset.active_at }.should_not raise_error
@ -124,7 +124,7 @@ describe AssetCollection do
it 'should remove field' do
@collection.asset_custom_fields.clear
@collection.upsert(false)
@collection.upsert(:validate => false)
@collection.reload
asset = @collection.assets.first
lambda { asset.active }.should raise_error
@ -133,7 +133,7 @@ describe AssetCollection do
it 'should rename field label' do
@collection.asset_custom_fields.first.label = 'Simple description'
@collection.asset_custom_fields.first._alias = nil
@collection.upsert(false)
@collection.upsert(:validate => false)
@collection.reload
asset = @collection.assets.first
asset.simple_description.should == 'Lorem ipsum'
@ -157,7 +157,7 @@ describe AssetCollection do
@collection.save; @collection = AssetCollection.first
@collection.update_attributes(:asset_custom_fields_attributes => {
'0' => { 'label' => 'My Description', 'kind' => 'Text', '_destroy' => '1' },
'1' => { 'label' => 'Active', 'kind' => 'Boolean', '_destroy' => '0' },
'1' => { 'label' => 'Active', 'kind' => 'Boolean', '_destroy' => '1' },
'2' => { 'label' => 'My Title !', 'kind' => 'String' },
'new_record' => { 'label' => 'Published at', 'kind' => 'String' }
})

View File

@ -351,7 +351,7 @@ describe Page do
end
it 'does forget to set the content type id' do
@page.content_type_id.should == '42'
@page.content_type_id.should == 42
end
end