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