Sha256: 2358d9a77a725b1bb91be7b67a47ff645a91a0a67281d6132c86fcf6fcd5a079
Contents?: true
Size: 786 Bytes
Versions: 11
Compression:
Stored size: 786 Bytes
Contents
# encoding: utf-8 require 'test_helper' class CustomBlockTest < Test::Unit::TestCase 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
11 entries across 11 versions & 3 rubygems