spec/neoid/model_additions_spec.rb in neoid-0.0.1 vs spec/neoid/model_additions_spec.rb in neoid-0.0.2

- old
+ new

@@ -75,16 +75,13 @@ end context "nodes" do context "create graph nodes" do it "should call neo_create on a neo_node for user" do - user = User.create(name: "Elad Ossadon") - - user.neo_find_by_id.should be_nil - - user.should_receive(:neo_create) - user.neo_node + User.any_instance.should_receive(:neo_create) + + User.create(name: "Elad Ossadon") end it "should create a neo_node for user" do user = User.create(name: "Elad Ossadon", slug: "elado") @@ -108,10 +105,9 @@ context "find by id" do it "should find a neo_node for user" do user = User.create(name: "Elad Ossadon", slug: "elado") - user.neo_find_by_id.should be_nil user.neo_node.should_not be_nil user.neo_find_by_id.should_not be_nil end end end