Module: Frank::Cucumber::LocationHelper

Included in:
FrankHelper
Defined in:
lib/frank-cucumber/location_helper.rb

Instance Method Summary collapse

Instance Method Details

#set_location(options = {}) ⇒ Object

Ask Frank to set the location.

Examples:

# Set the location to Stockholm
set_location(:latitude => 59.338887, :longitude => 18.058425)


10
11
12
13
14
15
16
17
# File 'lib/frank-cucumber/location_helper.rb', line 10

def set_location(options = {})
  res = frank_server.send_post( 
    'location',
    :latitude => options[:latitude],
    :longitude => options[:longitude]
  )
  Frank::Cucumber::Gateway.evaluate_frankly_response( res, "setting the location to #{options[:latitude]}, #{options[:longitude]}" )
end