Sha256: bdad999fb7cd48788ec32cfe87f20a883ae53155249bc4ce0d788f9385838f1a

Contents?: true

Size: 730 Bytes

Versions: 3

Compression:

Stored size: 730 Bytes

Contents

require 'spec_helper'

RSpec.describe SimCtl do
  it 'executes example code from readme' do
    # Select the iOS 9.3 runtime
    runtime = SimCtl.runtime(name: 'iOS 9.3')

    # Select the iPhone 6 device type
    devicetype = SimCtl.devicetype(name: 'iPhone 6')

    # Create a new device
    device = SimCtl.create_device 'Unit Tests @ iPhone 6 9.3', devicetype, runtime

    # Launch a new Simulator.app instance
    device.launch

    # Wait for the device to be booted
    device.wait { |d| d.state == :booted }

    # Kill the Simulator.app instance again
    device.shutdown
    device.kill

    # Wait until it did shutdown
    device.wait { |d| d.state == :shutdown }

    # Delete the device
    device.delete
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
simctl-1.6.5 spec/simctl/readme_spec.rb
simctl-1.6.4 spec/simctl/readme_spec.rb
simctl-1.6.3 spec/simctl/readme_spec.rb