Created
August 2, 2012 19:46
-
-
Save jonasmaturana/3240045 to your computer and use it in GitHub Desktop.
Modified app_installation_hooks.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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