Skip to content

Commit

Permalink
Merge pull request maxdemarzi#91 from kamranjon/integration
Browse files Browse the repository at this point in the history
fixing eager loading bug
  • Loading branch information
kamranjon committed Jan 14, 2014
2 parents 0274ba0 + be0ddae commit fcb4738
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/deja/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Query

class << self
def load_node(neo_id, options = {})
options[:return_root] ||= :root_only
options[:return_root] = options[:include] ? :root_rel_end : :root_only
options[:include] ||= :none
cypher_query = Deja::Bridge.get_nodes(neo_id, options)
result_hash = Deja.execute_cypher(cypher_query)
Expand Down
4 changes: 2 additions & 2 deletions spec/node_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class HasHate < Relationship; end
@node.permalink.should eq(@first_node.permalink)
end

it "calling invested_in should call related_nodes" do
@node.should_receive(:related_nodes).and_call_original
it "calling invested_in should not call related_nodes" do
@node.should_not_receive(:related_nodes).and_call_original
@node.investment
end

Expand Down

0 comments on commit fcb4738

Please sign in to comment.