active_record_survey 0.1.42 → 0.1.43
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dc949333e22faad454c71dbdc2cd63088cd71cf
|
4
|
+
data.tar.gz: d341536053150cdfcca45862094780537de92539
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ebc9abf180663238c747ba7173754435148a1b9bf99c996825dd864bed8f25f0cbc96b14ad987ecc65ecf4d382cab28c60a7071056472c13240e8ced7709581
|
7
|
+
data.tar.gz: 0b85ef3c7fef633bcfc843a3782114fd5dac5884b48993c0a936d35737f4c873e0e989bdd696532653533127574846e49b647ff542d3e73b4ec6bdefe734acb3
|
@@ -2,7 +2,7 @@ module ActiveRecordSurvey
|
|
2
2
|
class Survey < ::ActiveRecord::Base
|
3
3
|
self.table_name = "active_record_surveys"
|
4
4
|
has_many :node_maps, :class_name => "ActiveRecordSurvey::NodeMap", :foreign_key => :active_record_survey_id, autosave: true
|
5
|
-
has_many :nodes,
|
5
|
+
has_many :nodes, :class_name => "ActiveRecordSurvey::Node", :foreign_key => :active_record_survey_id
|
6
6
|
has_many :questions, :class_name => "ActiveRecordSurvey::Node::Question", :foreign_key => :active_record_survey_id
|
7
7
|
|
8
8
|
def root_node
|
@@ -47,12 +47,15 @@ describe ActiveRecordSurvey::Survey, :survey_spec => true do
|
|
47
47
|
@survey.save
|
48
48
|
end
|
49
49
|
|
50
|
-
describe '#edges'
|
50
|
+
describe '#edges' do
|
51
51
|
it 'should return an array of all the connective edges' do
|
52
|
-
|
52
|
+
expect(@survey.edges.length).to eq(16)
|
53
|
+
end
|
54
|
+
end
|
53
55
|
|
54
|
-
|
55
|
-
|
56
|
+
describe '#nodes', :focus => true do
|
57
|
+
it 'should return an array of all the nodes' do
|
58
|
+
expect(@survey.nodes.length).to eq(13)
|
56
59
|
end
|
57
60
|
end
|
58
61
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_survey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.43
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Butch Marshall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|