Sha256: 1ff51373742ee0b9c5c3585f56c1feccc7b9fee19633f50769ac009a37e0925f

Contents?: true

Size: 1.22 KB

Versions: 5

Compression:

Stored size: 1.22 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 |scenario|
  launcher = Calabash::Launcher.launcher
  options = {
    # Add launch options here.
  }

  launcher.relaunch(options)
  launcher.calabash_notify(self)
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 NO_STOP for a nice debugging workflow
  #
  # http://calabashapi.xamarin.com/ios/file.ENVIRONMENT_VARIABLES.html#label-NO_STOP
  # http://calabashapi.xamarin.com/ios/Calabash/Cucumber/Core.html#console_attach-instance_method
  unless launcher.calabash_no_stop?
    calabash_exit
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
calabash-cucumber-0.18.2 features-skeleton/support/01_launch.rb
calabash-cucumber-0.18.1 features-skeleton/support/01_launch.rb
calabash-cucumber-0.18.0 features-skeleton/support/01_launch.rb
calabash-cucumber-0.17.1 features-skeleton/support/01_launch.rb
calabash-cucumber-0.17.0 features-skeleton/support/01_launch.rb