Skip to content

Commit

Permalink
update tests for changes in google's directions
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Crews committed Feb 26, 2014
1 parent 1278606 commit a590365
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/unit/google_directions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ def test_happy_case
dest = "499 Gordonsville Highway, 38563"
directions = GoogleDirections.new(orig, dest)
assert_equal(4, directions.distance_in_miles)
assert_equal(6, directions.drive_time_in_minutes)
assert_equal(5, directions.drive_time_in_minutes)
assert_equal('http://maps.googleapis.com/maps/api/directions/xml?language=en&alternative=true&sensor=false&mode=driving&origin=121+Gordonsville+Highway%2C+37030&destination=499+Gordonsville+Highway%2C+38563', directions.xml_call)
# end_location > lat
assert_not_nil(directions.xml =~ /36\.1772300/)

assert_equal orig, directions.origin
assert_equal dest, directions.destination
end
Expand Down Expand Up @@ -41,13 +41,13 @@ def test_french_direction
def test_steps
directions = GoogleDirections.new("rue poissonnière, 75002 Paris", "51 rue de Turbigo, 75003 Paris France")
assert_equal Array, directions.steps.class
assert_equal 3, directions.steps.size
assert_equal 5, directions.steps.size
end

def test_distance_text
directions = GoogleDirections.new("Place du Maquis du Vercors PARIS-19EME", "rue poissoniere 75002 paris")
assert_equal String, directions.distance_text.class
assert_equal "6.7 km", directions.distance_text
assert_equal "6.5 km", directions.distance_text
end

def test_zero_distance_text
Expand Down

0 comments on commit a590365

Please sign in to comment.