Skip to content

Conversation

jtzero
Copy link

@jtzero jtzero commented Nov 22, 2024

Test commit fails because of malformed function

Failures:

  1) DeepL::DocumentApi#translate_document raises an IOError when the output file already exists
     Failure/Error:
       expect do
         DeepL.document.translate_document(example_doc_path, output_document_path,
           source_lang, target_lang, File.basename(example_doc_path),
           {})
       end.to raise_error(IOError)

       expected IOError, got #<NoMethodError: undefined method `IOError' for #<DeepL::DocumentApi:0x00000001064b7600 @api=#<DeepL:...work_retries=5, @logger=nil>, @http_client=#<Net::HTTP api.deepl.com:443 open=false>>, @options={}>> with backtrace:
         # ./lib/deepl/document_api.rb:94:in `translate_document'
         # ./spec/integration_tests/document_api_spec.rb:43:in `block (4 levels) in <top (required)>'
         # ./spec/integration_tests/document_api_spec.rb:42:in `block (3 levels) in <top (required)>'
         # ./spec/integration_tests/integration_test_utils.rb:161:in `block (3 levels) in <top (required)>'
         # ./spec/integration_tests/integration_test_utils.rb:159:in `block (2 levels) in <top (required)>'
     # ./spec/integration_tests/document_api_spec.rb:42:in `block (3 levels) in <top (required)>'
     # ./spec/integration_tests/integration_test_utils.rb:161:in `block (3 levels) in <top (required)>'
     # ./spec/integration_tests/integration_test_utils.rb:159:in `block (2 levels) in <top (required)>'

Finished in 0.02217 seconds (files took 0.82862 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/integration_tests/document_api_spec.rb:35 # DeepL::DocumentApi#translate_document raises an IOError when the output file already exists

Test passes in fix commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant