Running RuboCop... Inspecting 43 files ........................................... 43 files inspected, no offenses detected /home/camilo/.rbenv/versions/2.5.1/bin/ruby -I/home/camilo/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/lib:/home/camilo/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-support-3.8.0/lib /home/camilo/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rspec-core-3.8.0/exe/rspec spec/mongoid/geospatial/fields/box_spec.rb spec/mongoid/geospatial/fields/circle_spec.rb spec/mongoid/geospatial/fields/line_string_spec.rb spec/mongoid/geospatial/fields/point_spec.rb spec/mongoid/geospatial/fields/polygon_spec.rb spec/mongoid/geospatial/geospatial_spec.rb spec/mongoid/geospatial/helpers/core_spec.rb spec/mongoid/geospatial/helpers/delegate_spec.rb spec/mongoid/geospatial/helpers/spatial_spec.rb spec/mongoid/geospatial/helpers/sphere_spec.rb spec/mongoid/geospatial/wrappers/georuby_spec.rb spec/mongoid/geospatial/wrappers/rgeo_spec.rb Running with Mongoid v6.0.3 Mongoid::Geospatial::Box  should work Mongoid::Geospatial::Circle  should work Mongoid::Geospatial::LineString (de)mongoize  should support a field mapped as linestring  should update line string too  should line_string += point nicely  should parent.line_string << point nicely (PENDING: Mongoid Issue #...)  should have same obj id (PENDING: Mongoid Issue #...)  should have same obj id ary  should support a field mapped as linestring  should have a bounding box  should have a geom box  should have a geom box  should have a center point  should have a radius helper  should have a radius sphere Mongoid::Geospatial::Point  should have #reverse to get lat, lon  should set point to nil  should update point x  should set point empty string to nil  should set point empty array to nil Moe's Bar  should not interfer with mongoid  should not fail if point is nil  should set point methodically  should set point with comma separated text  should set point with space separated text  should set point with space comma separated text methods  should have a .to_a  should have an array [] accessor  should have an ActiveModel symbol accessor  should have a radius helper  should have a radius sphere helper  should have a radius sphere helper in meters  should have a radius sphere helper in miles queryable :near :near_sphere  returns the documents sorted closest to furthest  returns the documents sorted closest to furthest  returns the documents sorted closest to furthest sphere  returns the documents sorted closest to furthest sphere  returns the documents sorted closest to furthest with max :within_circle :within_spherical_circle  returns the documents within a circle (PENDING: Circle)  returns the documents within a spherical circle (PENDING: Circle)  returns the documents within a center circle (PENDING: Circle)  returns the documents within a box (de)mongoize  should mongoize array  should mongoize hash  should mongoize hash with symbols in any order  should mongoize hash with string keys in any order with rgeo instantiated  should demongoize to rgeo Mongoid::Geospatial::Polygon  should have correct indexes on farm (de)mongoize  should support a field mapped as polygon  should store as array on mongo  should have a bounding box  should have a center point  should have a radius helper  should have a radius sphere query :box, :polygon  returns the documents within a box  returns the documents within a polygon Mongoid::Geospatial Class Stuff  should have an lng_symbols accessor  should have an lat_symbols accessor Creating indexes  should create a 2d index  should create a 2dsphere index #nearby 2d  should work specifing center and different location #nearby 2dsphere  should work with specific center and different spot attribute  should work with default origin  should work with default origin key :paginate  limits fine with 25  limits fine with 25 and skips  paginates 50 :query  should filter using extra query option :maxDistance  should get 1 item Mongoid::Fields delegate  should set instance methods x= and y=  should work fine with default values  should not work fine with nils  should update point x  should update point y x, y helpers  should set instance method x  should set instance method y  should set instance method x=  should set instance method y= Mongoid::Fields spatial  should created indexes  should create correct indexes (FAILED - 1)  should set spatial fields  should set some class methods Mongoid::Fields spatial  should created indexes  should create correct indexes (FAILED - 2)  should set spatial fields  should work fine indexed Mongoid::Geospatial::Point  should not interfer with mongoid  should not respond to distance before loading external gem queryable (de)mongoize  should mongoize array  should mongoize hash  should accept a GeoRuby point  should calculate 3d distances by default simple features  should mongoize lines  should mongoize polygon RGeo Wrapper Mongoid::Geospatial::Point  should not interfer with mongoid  should not respond to distance before loading external Mongoid::Geospatial::Polygon  should not interfer with mongoid  should respond to to_geo Mongoid::Geospatial::LineString  should not interfer with mongoid  should respond to to_geo before loading external queryable (de)mongoize Mongoid::Geospatial::Point  should mongoize array  should wrap to georuby  should wrap to rgeo  should mongoize hash  should accept an RGeo object  should calculate 3d distances by default Mongoid::Geospatial::Polygon  should mongoize array Mongoid::Geospatial::LineString  should mongoize array Pending: (Failures listed here are expected and do not affect your suite's status) 1) Mongoid::Geospatial::LineString (de)mongoize should parent.line_string << point nicely # Mongoid Issue #... Failure/Error: expect(River.first.course).to eq([[1, 1], [9, 9], [10, 10]])   expected: [[1, 1], [9, 9], [10, 10]]  got: [[1, 1], [9, 9]]   (compared using ==) # ./spec/mongoid/geospatial/fields/line_string_spec.rb:30:in `block (3 levels) in ' 2) Mongoid::Geospatial::LineString (de)mongoize should have same obj id # Mongoid Issue #... Failure/Error: expect(river.course.object_id).to eq(river.course.object_id)   expected: 47290592433040  got: 47290592433400   (compared using ==) # ./spec/mongoid/geospatial/fields/line_string_spec.rb:36:in `block (3 levels) in ' 3) Mongoid::Geospatial::Point queryable :within_circle :within_spherical_circle returns the documents within a circle # Circle Failure/Error: expect(Bar.where(:location.within_circle => l).to_a).to include(mile3)  NoMethodError:  undefined method `within_circle' for :location:Symbol  Did you mean? within_polygon # ./spec/mongoid/geospatial/fields/point_spec.rb:183:in `block (4 levels) in ' 4) Mongoid::Geospatial::Point queryable :within_circle :within_spherical_circle returns the documents within a spherical circle # Circle Failure/Error:  expect(Bar.where(:location.within_spherical_circle =>  [elvis.location, 0.0005]).to_a).to eq([mile1])  NoMethodError:  undefined method `within_spherical_circle' for :location:Symbol # ./spec/mongoid/geospatial/fields/point_spec.rb:188:in `block (4 levels) in ' 5) Mongoid::Geospatial::Point queryable :within_circle :within_spherical_circle returns the documents within a center circle # Circle Failure/Error:  expect(Bar.where(:location.within_center_circle =>  [elvis.location, 0.0005]).to_a).to eq([mile1])  NoMethodError:  undefined method `within_center_circle' for :location:Symbol # ./spec/mongoid/geospatial/fields/point_spec.rb:194:in `block (4 levels) in ' Failures: 1) Mongoid::Fields spatial should create correct indexes Failure/Error:  expect(Bar.collection.indexes.get(location: '2d'))  .to eq('key' => { 'location' => '2d' },  'name' => 'location_2d',  'ns' => 'mongoid_geo_test.bars',  'v' => 1)   expected: {"key"=>{"location"=>"2d"}, "name"=>"location_2d", "ns"=>"mongoid_geo_test.bars", "v"=>1}  got: {"key"=>{"location"=>"2d"}, "name"=>"location_2d", "ns"=>"mongoid_geo_test.bars", "v"=>2}   (compared using ==)   Diff:  @@ -1,5 +1,5 @@   "key" => {"location"=>"2d"},   "name" => "location_2d",   "ns" => "mongoid_geo_test.bars",  -"v" => 1,  +"v" => 2,   # ./spec/mongoid/geospatial/helpers/spatial_spec.rb:14:in `block (3 levels) in ' 2) Mongoid::Fields spatial should create correct indexes Failure/Error:  expect(Alarm.collection.indexes.get(spot: '2dsphere'))  .to include('key' => { 'spot' => '2dsphere' },  'name' => 'spot_2dsphere',  'ns' => 'mongoid_geo_test.alarms',  'v' => 1)   expected {"2dsphereIndexVersion" => 3, "key" => {"spot" => "2dsphere"}, "name" => "spot_2dsphere", "ns" => "mongoid_geo_test.alarms", "v" => 2} to include {"v" => 1}  Diff:    @@ -1,5 +1,6 @@  +"2dsphereIndexVersion" => 3,   "key" => {"spot"=>"2dsphere"},   "name" => "spot_2dsphere",   "ns" => "mongoid_geo_test.alarms",  -"v" => 1,  +"v" => 2,   # ./spec/mongoid/geospatial/helpers/sphere_spec.rb:14:in `block (3 levels) in ' Finished in 2.81 seconds (files took 0.80133 seconds to load) 108 examples, 2 failures, 5 pending Failed examples: rspec ./spec/mongoid/geospatial/helpers/spatial_spec.rb:13 # Mongoid::Fields spatial should create correct indexes rspec ./spec/mongoid/geospatial/helpers/sphere_spec.rb:13 # Mongoid::Fields spatial should create correct indexes