lib/calabash/ios/device/device_implementation.rb in calabash-2.0.0.pre4 vs lib/calabash/ios/device/device_implementation.rb in calabash-2.0.0.pre5
- old
+ new
@@ -369,11 +369,11 @@
def expect_valid_simulator_state_for_starting(application, run_loop_device)
bridge = run_loop_bridge(run_loop_device, application)
expect_app_installed_on_simulator(bridge)
- installed_app = Calabash::IOS::Application.new(bridge.fetch_app_dir)
+ installed_app = Calabash::IOS::Application.new(bridge.send(:installed_app_bundle_dir))
expect_matching_sha1s(installed_app, application)
end
# @!visibility private
def start_app_on_physical_device(application, options)
@@ -470,11 +470,11 @@
end
bridge = run_loop_bridge(@run_loop_device, application)
if bridge.app_is_installed?
- installed_app = Calabash::IOS::Application.new(bridge.fetch_app_dir)
+ installed_app = Calabash::IOS::Application.new(bridge.send(:installed_app_bundle_dir))
if installed_app.same_sha1_as?(application)
true
else
@logger.log("The installed app and the target app are different.", :info)
@@ -573,13 +573,13 @@
end
# @!visibility private
def uninstall_app_on_simulator(application, run_loop_device, bridge)
begin
- bridge.uninstall
+ bridge.uninstall_app_and_sandbox
true
- rescue e
+ rescue => e
raise "Could not uninstall #{application.identifier} on #{run_loop_device}: #{e}"
end
end
# @!visibility private
@@ -601,14 +601,15 @@
def run_loop_device
@run_loop_device ||= RunLoop::Device.device_with_identifier(identifier)
end
# @!visibility private
- # Do not memoize this. The Bridge initializer does a bunch of work to
+ # Do not memoize this. The CoreSimulator initializer does a bunch of work to
# prepare the environment for simctl actions.
def run_loop_bridge(run_loop_simulator_device, application)
- RunLoop::Simctl::Bridge.new(run_loop_simulator_device, application.path)
+ run_loop_app = RunLoop::App.new(application.path)
+ RunLoop::CoreSimulator.new(run_loop_simulator_device, run_loop_app)
end
# @!visibility private
def install_app_on_simulator(application, run_loop_device, run_loop_bridge = nil)
begin
@@ -617,10 +618,10 @@
bridge = run_loop_bridge(run_loop_device, application)
else
bridge = run_loop_bridge
end
- bridge.uninstall
+ bridge.uninstall_app_and_sandbox
bridge.install
rescue StandardError => e
raise "Could not install #{application} on #{run_loop_device}: #{e}"
end
end