mongo_mapper-unstable 2010.1.31 → 2010.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2010.01.31
1
+ 2010.02.01
@@ -365,7 +365,7 @@ class IdentityMapTest < Test::Unit::TestCase
365
365
  key :parent_id, ObjectId
366
366
 
367
367
  belongs_to :parent, :class_name => 'Item'
368
- one :child, :class_name => 'Blog'
368
+ one :blog, :class_name => 'Blog', :foreign_key => 'parent_id'
369
369
  end
370
370
  Item.collection.remove
371
371
 
@@ -421,9 +421,15 @@ class IdentityMapTest < Test::Unit::TestCase
421
421
  blog = Blog.create(:title => 'Jill')
422
422
  assert_in_map(blog)
423
423
 
424
- root = Item.create(:title => 'Root', :child => blog)
424
+ root = Item.create(:title => 'Root', :blog => blog)
425
425
  assert_in_map(root)
426
- root.child.should equal(blog)
426
+ root.blog.should equal(blog)
427
+ end
428
+
429
+ should "work correctly with one proxy create" do
430
+ root = Item.create(:title => 'Root')
431
+ blog = root.blog.create(:title => 'Blog')
432
+ blog.parent.should equal(root)
427
433
  end
428
434
  end
429
435
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_mapper-unstable
3
3
  version: !ruby/object:Gem::Version
4
- version: 2010.1.31
4
+ version: 2010.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-31 00:00:00 -05:00
12
+ date: 2010-02-01 00:00:00 -05:00
13
13
  default_executable: mmconsole
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency