diff --git a/spec/query_spec.rb b/spec/query_spec.rb index c24fcba..60c317d 100644 --- a/spec/query_spec.rb +++ b/spec/query_spec.rb @@ -14,10 +14,6 @@ def to_query }) end - def method_missing(method, *args, &block) - add_path(method) - end - def execute! q = self.to_query api = Morpheus::API.const_get(q.type.to_s.camelize).new @@ -26,6 +22,11 @@ def execute! protected + def method_missing(method, *args, &block) + add_path(method) + end + + def assemble_paths Kernel.raise "Nothing is defined for the query." if @paths.empty? @paths.map{|p| "-[:#{p}]->"}.join("()")