Sha256: bb543a50863fdcf718e8e331add701c9a2a01a87642fa5639fad7bb081ccbc8a

Contents?: true

Size: 1.49 KB

Versions: 5

Compression:

Stored size: 1.49 KB

Contents

require 'test_helper'

class SimCtl::Command::ListTest < Minitest::Test
  context 'devicetype' do
    should 'find device type by name' do
      assert_kind_of SimCtl::DeviceType, SimCtl.devicetype(name: 'iPhone 5')
    end
  end

  context 'list_devicetypes' do
    should 'contain some devicetypes' do
      assert SimCtl.list_devicetypes.count > 0
    end

    should 'be a SimCtl::DeviceType object' do
      assert_kind_of SimCtl::DeviceType, SimCtl.list_devicetypes.first
    end

    should 'parse identifier property' do
      assert SimCtl.list_devicetypes.first.identifier != nil
    end

    should 'parse name property' do
      assert SimCtl.list_devicetypes.first.name != nil
    end
  end

  context 'list_runtimes' do
    should 'contain some runtimes' do
      assert SimCtl.list_runtimes.count > 0
    end

    should 'be a SimCtl::Runtime object' do
      assert_kind_of SimCtl::Runtime, SimCtl.list_runtimes.first
    end

    should 'parse availability property' do
      assert SimCtl.list_runtimes.first.availability != nil
    end

    should 'parse buildversion property' do
      assert SimCtl.list_runtimes.first.buildversion != nil
    end

    should 'parse identifier property' do
      assert SimCtl.list_runtimes.first.identifier != nil
    end

    should 'parse name property' do
      assert SimCtl.list_runtimes.first.name != nil
    end
  end

  context 'runtime' do
    should 'find runtime by name' do
      assert_kind_of SimCtl::Runtime, SimCtl.runtime(name: 'iOS 9.2')
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
simctl-1.1.0 test/simctl/command/list_test.rb
simctl-1.0.2 test/simctl/command/list_test.rb
simctl-1.0.1 test/simctl/command/list_test.rb
simctl-1.0.0 test/simctl/command/list_test.rb
simctl-0.2.0 test/simctl/command/list_test.rb