tests/waypoint_test.rb in andrewhao-gpx-0.7 vs tests/waypoint_test.rb in andrewhao-gpx-0.8

- old
+ new

@@ -1,14 +1,14 @@ -require 'test/unit' +require 'minitest/autorun' require 'gpx' -class WaypointTest < Test::Unit::TestCase +class WaypointTest < Minitest::Test def test_read_waypoints gpx = GPX::GPXFile.new(:gpx_file => File.join(File.dirname(__FILE__), "gpx_files/waypoints.gpx")) - assert_equal(17, gpx.waypoints.size) + assert_equal(18, gpx.waypoints.size) # First Waypoint # <wpt lat="40.035557" lon="-105.248268"> # <name><![CDATA[001]]></name> # <sym>Waypoint</sym> @@ -36,9 +36,13 @@ assert_equal(39.993070, second_wpt.lat) assert_equal(-105.296588, second_wpt.lon) assert_equal('002', second_wpt.name) assert_equal('Waypoint', second_wpt.sym) assert_equal(1955.192, second_wpt.elevation) - + + # test loads time properly in waypoint + time_wpt = gpx.waypoints[17] + assert_equal(Time.xmlschema("2015-01-01T12:12:12Z"), time_wpt.time) + end end