Sha256: 18685b13f0d01ebb235b05ec7bcacdfc15ee0024f343a301dc107217674743ed

Contents?: true

Size: 915 Bytes

Versions: 4

Compression:

Stored size: 915 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.dateModified.should == 1413472373000
			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

4 entries across 4 versions & 1 rubygems

Version Path
xcode-install-0.3.0 spec/json_spec.rb
xcode-install-0.2.0 spec/json_spec.rb
xcode-install-0.1.1 spec/json_spec.rb
xcode-install-0.1.0 spec/json_spec.rb