Skip to content

Commit

Permalink
make specs disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
dnagir committed Dec 6, 2011
1 parent e3f4336 commit d7ff28d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lib/morpheus/node.rb
Expand Up @@ -100,6 +100,10 @@ def relations
def has_relation?(name)
respond_to?(:relations) && (relations || []).include?(name.to_sym)
end

def api_endpoint
:nodes
end
end
end

Expand Down
5 changes: 2 additions & 3 deletions spec/api/cypher_spec.rb
Expand Up @@ -30,18 +30,17 @@
end

subject { Morpheus::API::Cypher.new }
before { subject.stub(:query_url).and_return uri }


describe "results" do
#before { FakeWeb.register_uri(:get, uri, :body => body) }
before { FakeWeb.register_uri(:post, uri, :body => body) }
let(:user_class) do
Class.new(Morpheus::Node) do
end
end

it "should return nodes" do
FakeWeb.allow_net_connect = true
Morpheus.configure_and_discover_database!
results = subject.execute(user_class, "start s=node(1234) return s")
results.first.should be_a user_class
results.first.name.should == "Mr 4-1"
Expand Down

0 comments on commit d7ff28d

Please sign in to comment.