don't expect betas when both exist

This commit is contained in:
Jacob Zaval 2020-06-16 14:14:08 -07:00
Родитель 1d11918120
Коммит 170007a39f
1 изменённых файлов: 15 добавлений и 7 удалений

Просмотреть файл

@ -55,26 +55,34 @@ describe MacOS::Xcode do
"9.3\n",
"9.4\n",
"9.4.1\n",
"9.4.2\n",
"9.4.2 beta 2\n",
"10\n",
"9.4.2\n",
"9.4.2 beta 3\n",
"10 beta 1\n",
"10 GM seed\n",
"10\n",
"10.1\n",
"10.3\n",
"11.0\n"]
)
end
it 'returns the name of Xcode 10 GM when initialized with the semantic version' do
it 'returns the name of Xcode 10 official when initialized with the semantic version' do
xcode = MacOS::Xcode.new('10.0', '/Applications/Xcode.app')
expect(xcode.version).to eq '10 GM seed'
expect(xcode.version).to eq '10'
expect(xcode.version).to_not eq '10 GM seed'
expect(xcode.version).to_not eq '10 beta 1'
end
it 'returns the name of Xcode 9.4 beta when initialized with the semantic version' do
it 'returns the name of Xcode 9.4.2 official when initialized with the semantic version' do
xcode = MacOS::Xcode.new('9.4.2', '/Applications/Xcode.app')
expect(xcode.version).to eq '9.4.2 beta 2'
expect(xcode.version).to eq '9.4.2'
expect(xcode.version).to_not eq '9.4.2 beta 2'
expect(xcode.version).to_not eq '9.4.2 beta 3'
end
it 'returns the temporary beta path set by xcversion when initialized with the semantic version' do
xcode = MacOS::Xcode.new('9.4.2', '/Applications/Xcode.app')
expect(xcode.current_path).to eq '/Applications/Xcode-9.4.2.beta.2.app'
expect(xcode.current_path).to eq '/Applications/Xcode-9.4.2.app'
end
it 'returns the name of Xcode 9.3 when initialized with the semantic version' do
xcode = MacOS::Xcode.new('9.3', '/Applications/Xcode.app')