lib/calabash/lib/skeleton/features/support/env.rb in calabash-1.9.9.pre1 vs lib/calabash/lib/skeleton/features/support/env.rb in calabash-1.9.9.pre2
- old
+ new
@@ -1,41 +1,21 @@
require 'calabash'
-platform = Calabash::Environment.variable('PLATFORM')
+platform = ENV['PLATFORM']
case platform
when 'android'
require 'calabash/android'
World(Calabash::Android)
- # Setup the default application
- Calabash::Application.default =
- Calabash::Android::Application.default_from_environment
-
- identifier = Calabash::Android::Device.default_serial
- server = Calabash::Android::Server.default
-
- # Setup the default device
- Calabash::Device.default =
- Calabash::Android::Device.new(identifier, server)
+ Calabash::Android.setup_defaults!
when 'ios'
require 'calabash/ios'
World(Calabash::IOS)
- # Setup the default application
- Calabash::Application.default =
- Calabash::IOS::Application.default_from_environment
-
- identifier =
- Calabash::IOS::Device.default_identifier_for_application(Calabash::Application.default)
-
- server = Calabash::IOS::Server.default
-
- # Setup the default device
- Calabash::Device.default =
- Calabash::IOS::Device.new(identifier, server)
+ Calabash::IOS.setup_defaults!
else
message = if platform.nil? || platform.empty?
'No platform given'
else
"Invalid platform '#{platform}'. Expected 'android' or 'ios'"