23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/cukunity/cucumber/support/platform_helpers.rb', line 23
def current_app=(path)
case File.extname(path).downcase
when '.app'
set_current_app_ios(path)
when '.apk'
set_current_app_android(path)
else
tags = @@__tags__
if tags.include?('@ios') or tags.include?('@~android')
path = set_current_app_ios("#{path}.app")
elsif tags.include?('@android') or tags.include?('@~ios')
path = set_current_app_android("#{path}.apk")
else
raise Exception::InvalidApp.new(path)
end
end
@current_app = path
end
|