poly_belongs_to 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/poly_belongs_to/core.rb +17 -0
- data/lib/poly_belongs_to/version.rb +1 -1
- data/test/core_test.rb +14 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +6257 -0
- data/test/pbt_test.rb +6 -0
- metadata +5 -4
data/test/pbt_test.rb
CHANGED
@@ -112,6 +112,12 @@ class PbtTest < ActiveSupport::TestCase
|
|
112
112
|
bob_to_prof.must_respond_to(:last )
|
113
113
|
bob_to_prof.must_be_kind_of(ActiveRecord::Associations::CollectionProxy)
|
114
114
|
end
|
115
|
+
|
116
|
+
it "AsCollectionProxy returns empty FakedCollection when handed unrelated instances" do
|
117
|
+
fc = PolyBelongsTo::Pbt::AsCollectionProxy[Alpha.new, Capa]
|
118
|
+
fc.must_be_kind_of(PolyBelongsTo::FakedCollection)
|
119
|
+
fc.must_be :empty?
|
120
|
+
end
|
115
121
|
end
|
116
122
|
|
117
123
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poly_belongs_to
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel P. Clark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -84,7 +84,8 @@ dependencies:
|
|
84
84
|
- - "<"
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '2'
|
87
|
-
description:
|
87
|
+
description: Uniform Omni-Relational ActiveRecord Tools. Includes polymorphic and
|
88
|
+
any belongs_to relation.
|
88
89
|
email:
|
89
90
|
- 6ftdan@gmail.com
|
90
91
|
executables: []
|
@@ -206,7 +207,7 @@ rubyforge_project:
|
|
206
207
|
rubygems_version: 2.4.6
|
207
208
|
signing_key:
|
208
209
|
specification_version: 4
|
209
|
-
summary:
|
210
|
+
summary: Uniform Omni-Relational ActiveRecord Tools
|
210
211
|
test_files:
|
211
212
|
- test/dup_test.rb
|
212
213
|
- test/fixtures/squishies.yml
|