From 34762afcb136f17565beb42d1e133a74a86cfcd2 Mon Sep 17 00:00:00 2001 From: Roel van Dijk Date: Mon, 1 Oct 2012 20:37:48 +0200 Subject: [PATCH] Spec #del. --- spec/unit/relationship_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/unit/relationship_spec.rb b/spec/unit/relationship_spec.rb index c140d6a..f257909 100644 --- a/spec/unit/relationship_spec.rb +++ b/spec/unit/relationship_spec.rb @@ -81,6 +81,21 @@ module Neography end end + describe "#del" do + + before do + db.stub(:create_relationship) { relationship_hash } + end + + subject(:relationship) { Relationship.create("type", from, to, props) } + + it "deletes a node" do + db.should_receive(:delete_relationship).with("0") + relationship.del + end + + end + describe "#other_node" do before do