Refactor alternative route test
This commit is contained in:
committed by
Patrick Niklaus
parent
9deadc1371
commit
55cad1b3ac
@@ -83,8 +83,12 @@ When /^I route I should get$/ do |table|
|
||||
if table.headers.include? 'route'
|
||||
got['route'] = (instructions || '').strip
|
||||
if table.headers.include?('alternative')
|
||||
raise "*** No alternative found ***" unless json['found_alternative']
|
||||
got['alternative'] = way_list json['alternative_instructions'].first
|
||||
got['alternative'] =
|
||||
if json['found_alternative']
|
||||
way_list json['alternative_instructions'].first
|
||||
else
|
||||
""
|
||||
end
|
||||
end
|
||||
if table.headers.include?('distance')
|
||||
if row['distance']!=''
|
||||
|
||||
Reference in New Issue
Block a user