Skip to content

Commit 9db104c

Browse files
committed
Account for variations of error message
Depending on the version of plutil installed on the machine, apparently
1 parent 7e1dbea commit 9db104c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spec/ios_download_strings_files_from_glotpress_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ def test_gp_download(filters:, tablename:, expected_gp_params:)
118118
expect(stub).to have_been_made.once
119119
file = File.join(tmp_dir, 'fr.lproj', 'Localizable.strings')
120120
expect(File).to exist(file)
121-
expected_error = 'Property List error: Unexpected character s at line 1 / JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0.'
122-
expect(error_messages).to eq(["Error while validating the file exported from GlotPress (`#{file}`) - #{file}: #{expected_error}"])
121+
expected_error = 'Property List error: Unexpected character s at line 1 / JSON error: JSON text did not start with array or object and option to allow fragments not set.'
122+
expect(error_messages.count).to eq(1)
123+
expect(error_messages.first).to start_with("Error while validating the file exported from GlotPress (`#{file}`) - #{file}: #{expected_error}") # Different versions of `plutil` might append the line/column as well, but not all.
123124
end
124125
end
125126

0 commit comments

Comments
 (0)