couchbase-model-relationship 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -74,7 +74,7 @@ module Couchbase
74
74
  def inherited(base)
75
75
  children = child_associations
76
76
  base.class_eval do
77
- @_children = children
77
+ @_children = children.dup
78
78
  end
79
79
  end
80
80
 
@@ -1,7 +1,7 @@
1
1
  module Couchbase
2
2
  class Model
3
3
  module Relationship
4
- VERSION = "0.1.8"
4
+ VERSION = "0.1.9"
5
5
  end
6
6
  end
7
7
  end
@@ -67,6 +67,19 @@ describe "parent" do
67
67
 
68
68
  InheritanceTest.new.child.should be_a(Child)
69
69
  end
70
+
71
+ it "seperates the childs relationships" do
72
+ Sister.stubs(_find: nil)
73
+
74
+ InheritanceTest.class_eval do
75
+ child :sister
76
+ end
77
+
78
+ InheritanceTest.new.sister.should be_a(Sister)
79
+
80
+ puts ParentTest.child_association_names
81
+ ParentTest.child_association_names.should_not include('Sister')
82
+ end
70
83
  end
71
84
 
72
85
  context "the getter" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: couchbase-model-relationship
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -218,7 +218,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  segments:
220
220
  - 0
221
- hash: -4399593191261304295
221
+ hash: -2417289105226944223
222
222
  required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  none: false
224
224
  requirements:
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
227
  version: '0'
228
228
  segments:
229
229
  - 0
230
- hash: -4399593191261304295
230
+ hash: -2417289105226944223
231
231
  requirements: []
232
232
  rubyforge_project:
233
233
  rubygems_version: 1.8.24