apneadiving/Google-Maps-for-Rails — pull request #222 by kristianmandrup (2012-06-24 18:27:05+00:00)
Title: Tested and works

At least the `models/place_spec.rb` now runs without fail

```ruby
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`

```ruby

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
```