poly_belongs_to 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -57,12 +57,14 @@ class DupTest < ActiveSupport::TestCase
57
57
  capa = beta.capas.build; capa.save
58
58
  delta = capa.deltas.build; delta.save
59
59
  alpha.update(delta_id: delta.id)
60
+
60
61
  it "is a circle" do
61
62
  alpha.pbt_parent.must_equal delta
62
63
  beta.pbt_parent.must_equal alpha
63
64
  capa.pbt_parent.must_equal beta
64
65
  delta.pbt_parent.must_equal capa
65
66
  end
67
+
66
68
  it "clones without duplicating cirular reference" do
67
69
  alpha2 = Alpha.new( CleanAttrs[alpha] )
68
70
  CleanAttrs[alpha2].must_equal CleanAttrs[alpha]
@@ -73,5 +75,6 @@ class DupTest < ActiveSupport::TestCase
73
75
  CleanAttrs[alpha2.betas.first.capas.first.deltas.first.alphas.first].must_equal CleanAttrs[alpha]
74
76
  alpha2.betas.first.capas.first.deltas.first.alphas.first.betas.first.must_be_nil
75
77
  end
78
+
76
79
  end
77
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poly_belongs_to
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel P. Clark