Skip to content

Commit 60fbf0f

Browse files
committed
Fix unit tests broken due to better xcconfig parsing and improved error handling
1 parent afd54a7 commit 60fbf0f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

spec/ios_get_build_number_spec.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
expect_build_number(xcconfig_mock_content: xcconfig_mock_content, expected_build_number: '1940')
1414
end
1515

16-
it 'parses an xcconfig file with keys with spaces and returns a nil build number' do
16+
it 'parses an xcconfig file with keys with spaces and returns the correct build number' do
1717
xcconfig_mock_content = <<~CONTENT
1818
VERSION_SHORT = 6
1919
VERSION_LONG = 6.30.1
2020
BUILD_NUMBER = 1940
2121
CONTENT
2222

23-
expect_build_number(xcconfig_mock_content: xcconfig_mock_content, expected_build_number: nil)
23+
expect_build_number(xcconfig_mock_content: xcconfig_mock_content, expected_build_number: '1940')
2424
end
2525

2626
it 'parses an xcconfig file with an invalid format and returns a nil build number' do
@@ -47,8 +47,7 @@
4747
run_described_fastlane_action(
4848
xcconfig_file_path: 'file/not/found'
4949
)
50-
# Ruby error for 'No such file or directory': https://ruby-doc.org/core-2.7.4/SystemCallError.html
51-
end.to raise_error(Errno::ENOENT)
50+
end.to raise_error(FastlaneCore::Interface::FastlaneError)
5251
end
5352

5453
def expect_build_number(xcconfig_mock_content:, expected_build_number:)

0 commit comments

Comments
 (0)