Sha256: d94b03015f915a946c5bc5e7a5c3c7b07758c6dfdab577052d78b62a694ee711

Contents?: true

Size: 960 Bytes

Versions: 35

Compression:

Stored size: 960 Bytes

Contents

require File.expand_path('../spec_helper', __FILE__)

module XcodeInstall
  describe JSON do
    it 'can parse Xcode JSON' do
      fixture = Pathname.new('spec/fixtures/xcode.json').read
      xcode = Xcode.new(JSON.parse(fixture))

      xcode.date_modified.should == 1_413_472_373_000
      xcode.name.should == 'Command Line Tools (OS X 10.9) for Xcode - Xcode 6.1'
      xcode.url.should == 'https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/command_line_tools_os_x_10.9_for_xcode__xcode_6.1/command_line_tools_for_osx_10.9_for_xcode_6.1.dmg'
    end

    it 'can parse list of all Xcodes' do
      fixture = Pathname.new('spec/fixtures/yolo.json').read
      installer = Installer.new

      seedlist = installer.send(:parse_seedlist, JSON.parse(fixture))
      installer.stubs(:installed_versions).returns([])
      installer.stubs(:xcodes).returns(seedlist)

      installer.list.should == "6.1\n6.1.1\n6.2"
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
xcode-install-2.2.0 spec/json_spec.rb
xcode-install-2.1.1 spec/json_spec.rb
xcode-install-2.1.0 spec/json_spec.rb
xcode-install-2.0.9 spec/json_spec.rb
xcode-install-2.0.8 spec/json_spec.rb
xcode-install-2.0.7 spec/json_spec.rb
xcode-install-2.0.6 spec/json_spec.rb
xcode-install-2.0.5 spec/json_spec.rb
xcode-install-2.0.4 spec/json_spec.rb
xcode-install-2.0.3 spec/json_spec.rb
xcode-install-2.0.2 spec/json_spec.rb
xcode-install-2.0.1 spec/json_spec.rb
xcode-install-2.0.0 spec/json_spec.rb
xcode-install-1.4.0 spec/json_spec.rb
xcode-install-1.3.0 spec/json_spec.rb
xcode-install-1.2.6 spec/json_spec.rb
xcode-install-1.2.5 spec/json_spec.rb
xcode-install-1.2.4 spec/json_spec.rb
xcode-install-1.2.3 spec/json_spec.rb
xcode-install-1.2.2 spec/json_spec.rb