Sha256: 7e4aff09b0b99f36a538d8b04636872d5ed5e5c145084e007f3b8ddfd97f4bbe

Contents?: true

Size: 1.2 KB

Versions: 9

Compression:

Stored size: 1.2 KB

Contents

require 'calabash-cucumber/launcher'

# You can find examples of more complicated launch hooks in these
# two repositories:
#
# https://github.com/calabash/ios-smoke-test-app/blob/master/CalSmokeApp/features/support/01_launch.rb
# https://github.com/calabash/ios-webview-test-app/blob/master/CalWebViewApp/features/support/01_launch.rb

module Calabash::Launcher
  @@launcher = nil

  def self.launcher
    @@launcher ||= Calabash::Cucumber::Launcher.new
  end

  def self.launcher=(launcher)
    @@launcher = launcher
  end
end

Before do
  launcher = Calabash::Launcher.launcher
  options = {
    timeout: 3000
  }

  launcher.relaunch(options)
end

After do |scenario|
  # Calabash can shutdown the app cleanly by calling the app life cycle methods
  # in the UIApplicationDelegate.  This is really nice for CI environments, but
  # not so good for local development.
  #
  # See the documentation for QUIT_APP_AFTER_SCENARIO for a nice debugging workflow
  #
  # http://calabashapi.xamarin.com/ios/file.ENVIRONMENT_VARIABLES.html#label-QUIT_APP_AFTER_SCENARIO
  # http://calabashapi.xamarin.com/ios/Calabash/Cucumber/Core.html#console_attach-instance_method
  if launcher.quit_app_after_scenario?
    calabash_exit
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
sunomono-1.0.6 lib/aws/ios/01_launch.rb
sunomono-1.0.5 lib/aws/ios/01_launch.rb
sunomono-1.0.4 lib/aws/ios/01_launch.rb
sunomono-1.0.3 lib/aws/ios/01_launch.rb
sunomono-1.0.0 lib/aws/ios/01_launch.rb
sunomono-0.3.1 lib/aws/ios/01_launch.rb
sunomono-0.3.0 lib/aws/ios/01_launch.rb
sunomono-0.2.0.pre lib/aws/ios/01_launch.rb
cs-bdd-0.1.9 lib/aws/ios/01_launch.rb