Skip to content

Instantly share code, notes, and snippets.

@marknorgren
Created April 10, 2012 17:21
Show Gist options
  • Save marknorgren/2353002 to your computer and use it in GitHub Desktop.
Save marknorgren/2353002 to your computer and use it in GitHub Desktop.
launch_steps.rb
def app_path
ENV['APP_BUNDLE_PATH'] || (defined?(APP_BUNDLE_PATH) && APP_BUNDLE_PATH)
end
Given /^I launch the app$/ do
# latest sdk and iphone by default
launch_app app_path
end
Given /^I launch the app using iOS (\d\.\d)$/ do |sdk|
# You can grab a list of the installed SDK with sim_launcher
# > run sim_launcher from the command line
# > open a browser to http://localhost:8881/showsdks
# > use one of the sdk you see in parenthesis (e.g. 4.2)
launch_app app_path, sdk
end
Given /^I launch the app using iOS (\d\.\d) and the (iphone|ipad) simulator$/ do |sdk, version|
launch_app app_path, sdk, version
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment