noodall-core 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/noodall/node.rb +1 -1
- data/noodall-core.gemspec +1 -1
- data/spec/node_spec.rb +15 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/lib/noodall/node.rb
CHANGED
data/noodall-core.gemspec
CHANGED
data/spec/node_spec.rb
CHANGED
@@ -58,6 +58,21 @@ describe Noodall::Node do
|
|
58
58
|
@grandchild = Page.create!(:title => "Very Ickle Kid", :parent => @child)
|
59
59
|
end
|
60
60
|
|
61
|
+
it "should list the roots" do
|
62
|
+
Page.create!(:title => "Root 2")
|
63
|
+
|
64
|
+
Noodall::Node.roots.should have(2).things
|
65
|
+
end
|
66
|
+
|
67
|
+
it "should know about it's siblings" do
|
68
|
+
3.times do |i|
|
69
|
+
Page.create!(:title => "Sibbling #{i}", :parent => @root)
|
70
|
+
end
|
71
|
+
|
72
|
+
@child.siblings.should have(3).things
|
73
|
+
@child.self_and_siblings.should have(4).things
|
74
|
+
end
|
75
|
+
|
61
76
|
it "should create permlink based on tree" do
|
62
77
|
@grandchild.permalink.to_s.should == "root/ickle-kid/very-ickle-kid"
|
63
78
|
@grandchild.reload
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noodall-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Steve England
|