Sha256: 915d400bb05338e5dd87372a5519737901eea1633a9bb1cdbc0125a726c27d7c
Contents?: true
Size: 845 Bytes
Versions: 1
Compression:
Stored size: 845 Bytes
Contents
# encoding: utf-8 require 'test_helper' class CustomBlockTest < Test::Unit::TestCase def setup Geocoder::Configuration.set_defaults end def test_geocode_with_block_runs_block e = Event.new(*venue_params(:msg)) coords = [40.750354, -73.993371] e.geocode assert_equal coords.map{ |c| c.to_s }.join(','), e.coords_string end def test_geocode_with_block_doesnt_auto_assign_coordinates e = Event.new(*venue_params(:msg)) e.geocode assert_nil e.latitude assert_nil e.longitude end def test_reverse_geocode_with_block_runs_block e = Party.new(*landmark_params(:msg)) e.reverse_geocode assert_equal "US", e.country end def test_reverse_geocode_with_block_doesnt_auto_assign_address e = Party.new(*landmark_params(:msg)) e.reverse_geocode assert_nil e.address end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
geocoder-1.0.2 | test/custom_block_test.rb |