At least the models/place_spec.rb now runs without fail
describe Gmaps4rails::ActsAsGmappable do
let(:place) { Factory(:place) }
let(:invalid_place) { Factory.build(:invalid_place) }
before(:each) do
Geocoding.stub_geocoding
end
context "standard configuration, valid place" do
it "should save longitude and latitude to the customized array" do
set_gmaps4rails_options!(:lat_lng_array => 'location')
place.location.should_not be_nil
place.should have_same_position_as TOULON
end
end
end
The model place.rb
require 'mongoid'
class Place
include Mongoid::Document
include Gmaps4rails::ActsAsGmappable
acts_as_gmappable :address => :address, :lat_lng_array => :location
field :location, :type => Array
field :address, :type => String
field :gmaps, :type => Boolean
end
At least the
models/place_spec.rb
now runs without failThe model
place.rb