Sha256: 302eb9916a4f44f9c59a5d7731c2f81ec85db0c906dfd966428edfa36f06e9c4
Contents?: true
Size: 842 Bytes
Versions: 14
Compression:
Stored size: 842 Bytes
Contents
$:.unshift(File.dirname(__FILE__) + '/../lib') require 'ym4r' require 'test/unit' include Ym4r::YahooMaps::BuildingBlock class TestTraffic< Test::Unit::TestCase def test_apple results = Traffic::get(:street => "1 Infinite Loop", :city => "Cupertino", :state => "CA", :zip => "95014", :include_map => true) #since it changes according to time, difficult to test.. assert(! results.nil?) assert(results.exact_match?) if(!results.empty?) result = results[0] apple_traffic_image = "apple_traffic.png" result.download_to(apple_traffic_image) assert(File.exist?(apple_traffic_image)) File.delete(apple_traffic_image) end end end
Version data entries
14 entries across 14 versions & 1 rubygems