cuke_bearing

This commit is contained in:
Emil Tin
2012-05-14 18:33:05 +02:00
parent 486eed4875
commit 5ed9c41d5e
4 changed files with 160 additions and 0 deletions
+8
View File
@@ -202,6 +202,8 @@ When /^I route I should get$/ do |table|
json = JSON.parse response.body
if json['status'] == 0
instructions = way_list json['route_instructions']
bearings = bearing_list json['route_instructions']
compasses = compass_list json['route_instructions']
end
end
@@ -221,6 +223,12 @@ When /^I route I should get$/ do |table|
raise "*** time must be specied in seconds. (ex: 60s)" unless row['time'] =~ /\d+s/
got['time'] = instructions ? "#{json['route_summary']['total_time'].to_s}s" : nil
end
if table.headers.include? 'bearing'
got['bearing'] = bearings
end
if table.headers.include? 'compass'
got['compass'] = compasses
end
end
if row != got