File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 expect_version ( xcconfig_mock_content : xcconfig_mock_content , expected_version : '6.30.1' )
2323 end
2424
25+ it 'parses the xcconfig with keys without spacing and gets the public version' do
26+ xcconfig_mock_content = <<~CONTENT
27+ // a comment
28+ VERSION_SHORT=6
29+ VERSION_LONG=6.30.0
30+ CONTENT
31+
32+ expect_version ( xcconfig_mock_content : xcconfig_mock_content , expected_version : '6.30' )
33+ end
34+
35+ it 'parses the xcconfig with keys without spacing and gets the public hotfix version' do
36+ xcconfig_mock_content = <<~CONTENT
37+ VERSION_SHORT=6
38+ // a comment
39+ VERSION_LONG=6.30.1
40+ CONTENT
41+
42+ expect_version ( xcconfig_mock_content : xcconfig_mock_content , expected_version : '6.30.1' )
43+ end
44+
45+ it 'fails to extract the version from an xcconfig file with an invalid format' do
46+ xcconfig_mock_content = <<~CONTENT
47+ VERSION_SHORT = 6
48+ VERSION_LONG 6.30.1
49+ CONTENT
50+
51+ expect do
52+ expect_version ( xcconfig_mock_content : xcconfig_mock_content , expected_version : 'n/a' )
53+ end . to raise_error ( FastlaneCore ::Interface ::FastlaneError )
54+ end
55+
2556 it 'throws an error when the file is not found' do
2657 file_path = 'file/not/found'
2758
You can’t perform that action at this time.
0 commit comments