spec/rgraph/node_spec.rb in rgraph-0.0.13 vs spec/rgraph/node_spec.rb in rgraph-0.0.14
- old
+ new
@@ -9,6 +9,15 @@
end
describe "#degree" do
its(:degree) { should eq 0}
end
+
+ describe "#has_neighbour" do
+ it "recognizes its neighbour" do
+ n1 = Node.new(id: 1)
+ n2 = Node.new(id: 1)
+ n1.neighbours << n2
+ expect(n1.has_neighbour?(n2)).to be_true
+ end
+ end
end