Skip to content

Instantly share code, notes, and snippets.

@jonasmaturana
Created August 2, 2012 19:46
Show Gist options
  • Save jonasmaturana/3240045 to your computer and use it in GitHub Desktop.
Save jonasmaturana/3240045 to your computer and use it in GitHub Desktop.
Modified app_installation_hooks.rb
require 'calabash-android/management/app_installation'
AfterConfiguration do |config|
FeatureNameMemory.feature_name = nil
end
Before do |scenario|
feature_name = scenario.feature.name
if FeatureNameMemory.feature_name != feature_name
log "Is first scenario - reinstalling apps"
uninstall_apps()
install_app(ENV["TEST_APP_PATH"])
install_app(ENV["APP_PATH"])
FeatureNameMemory.feature_name = feature_name
end
end
FeatureNameMemory = Class.new
class << FeatureNameMemory
@feature_name = nil
attr_accessor :feature_name
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment