Closed ProGM closed 8 years ago
Adding a require 'json'
in spec is temporary fixing it.
Moving to module-definition_part2
branch fixes #8 , but many specs are failing. Further investigating...
$ rake spec
Neo4j::Server::Spatial
find the spatial plugin
can get a description of the spatial plugin
add a point layer
can add a simple point layer
can add a simple point layer with lat and long
add an editable layer
can add an editable layer
get a spatial layer
can get a layer
create a spatial index
can create a spatial index
add geometry to spatial layer
can add a geometry
update geometry from spatial layer
can update a geometry
add a node to a layer
can add a node to a simple point layer
find geometries in a bounding box
can find a geometry in a bounding box (FAILED - 1)
can find a geometry in a bounding box using cypher
can find a geometry in a bounding box using cypher two
find geometries within distance
can find a geometry within distance (FAILED - 2)
can find a geometry within distance using cypher
can find a geometry within distance using cypher 2
ActiveNode integration
is a QueryProxy (FAILED - 3)
matches to the node in the spatial index (FAILED - 4)
only returns expected nodes (FAILED - 5)
Failures:
1) Neo4j::Server::Spatial find geometries in a bounding box can find a geometry in a bounding box
Failure/Error: expect(node.first[:data][:name]).to eq("Max's Restaurant")
expected: "Max's Restaurant"
got: nil
(compared using ==)
# ./spec/neo4jrb_spatial_spec.rb:101:in `block (3 levels) in <top (required)>'
2) Neo4j::Server::Spatial find geometries within distance can find a geometry within distance
Failure/Error: expect(node.first[:data][:name]).to eq("Max's Restaurant")
expected: "Max's Restaurant"
got: nil
(compared using ==)
# ./spec/neo4jrb_spatial_spec.rb:134:in `block (3 levels) in <top (required)>'
3) Neo4j::Server::Spatial ActiveNode integration is a QueryProxy
Failure/Error: let(:match) { Restaurant.all.spatial_match(:r, 'withinDistance:[60.0,15.0,100.0]') }
NoMethodError:
undefined method `spatial_match' for #<QueryProxy Restaurant CYPHER: "MATCH (n:`Restaurant`)">
# ./spec/neo4jrb_spatial_spec.rb:177:in `block (3 levels) in <top (required)>'
# ./spec/neo4jrb_spatial_spec.rb:180:in `block (3 levels) in <top (required)>'
4) Neo4j::Server::Spatial ActiveNode integration matches to the node in the spatial index
Failure/Error: let(:match) { Restaurant.all.spatial_match(:r, 'withinDistance:[60.0,15.0,100.0]') }
NoMethodError:
undefined method `spatial_match' for #<QueryProxy Restaurant CYPHER: "MATCH (n:`Restaurant`)">
# ./spec/neo4jrb_spatial_spec.rb:177:in `block (3 levels) in <top (required)>'
# ./spec/neo4jrb_spatial_spec.rb:184:in `block (3 levels) in <top (required)>'
5) Neo4j::Server::Spatial ActiveNode integration only returns expected nodes
Failure/Error: let(:match) { Restaurant.all.spatial_match(:r, 'withinDistance:[60.0,15.0,100.0]') }
NoMethodError:
undefined method `spatial_match' for #<QueryProxy Restaurant CYPHER: "MATCH (n:`Restaurant`)">
# ./spec/neo4jrb_spatial_spec.rb:177:in `block (3 levels) in <top (required)>'
# ./spec/neo4jrb_spatial_spec.rb:188:in `block (3 levels) in <top (required)>'
Finished in 4.04 seconds (files took 2.05 seconds to load)
18 examples, 5 failures
Failed examples:
rspec ./spec/neo4jrb_spatial_spec.rb:95 # Neo4j::Server::Spatial find geometries in a bounding box can find a geometry in a bounding box
rspec ./spec/neo4jrb_spatial_spec.rb:128 # Neo4j::Server::Spatial find geometries within distance can find a geometry within distance
rspec ./spec/neo4jrb_spatial_spec.rb:179 # Neo4j::Server::Spatial ActiveNode integration is a QueryProxy
rspec ./spec/neo4jrb_spatial_spec.rb:183 # Neo4j::Server::Spatial ActiveNode integration matches to the node in the spatial index
rspec ./spec/neo4jrb_spatial_spec.rb:187 # Neo4j::Server::Spatial ActiveNode integration only returns expected nodes
I tried to clone the repo, run
bundle install
and finally run tests:I can't understand why
JSON
is a problem. Maybe a dependency problem with neo4j?