Skip to content

Instantly share code, notes, and snippets.

@dlongmuir
Created December 2, 2011 20:12
Show Gist options
  • Save dlongmuir/1424668 to your computer and use it in GitHub Desktop.
Save dlongmuir/1424668 to your computer and use it in GitHub Desktop.
env.rb that greps for Frankified apps
require 'frank-cucumber'
temp_app_path= `find . -regex ".*[Ff]rankified\.app$"`.chomp
if temp_app_path.empty?
temp_app_path= `find ../build -regex ".*[Ff]rankified\.app$"`.chomp
end
if temp_app_path.empty?
temp_app_path= `find ~/Library/Developer/Xcode/DerivedData -regex ".*[Ff]rankified\.app$"`.chomp
end
if temp_app_path.empty?
raise "Error - app to test not found. Searched [., ../build, ~/Library/Developer/Xcode/DerivedData]. (maybe you're in the features directory?)"
end
APP_BUNDLE_PATH = temp_app_path
puts "App under test is #{APP_BUNDLE_PATH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment