make distance tests without +- work

This commit is contained in:
Emil Tin 2012-10-03 09:49:45 +02:00
parent 6fb2a41a0a
commit 30465f08ac

View File

@ -220,7 +220,7 @@ When /^I route I should get$/ do |table|
if row['distance']!=''
raise "*** Distance must be specied in meters. (ex: 250m)" unless row['distance'] =~ /\d+m/
end
got['distance'] = instructions ? json['route_summary']['total_distance'].to_s : ''
got['distance'] = instructions ? "#{json['route_summary']['total_distance'].to_s}m" : ''
end
if table.headers.include?('time')
raise "*** Time must be specied in seconds. (ex: 60s)" unless row['time'] =~ /\d+s/