From 64ce6ff30f5bd7b1b121a5bf323f9b846b4986e1 Mon Sep 17 00:00:00 2001 From: Mike Karlesky Date: Tue, 30 Apr 2024 20:43:55 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Fixed=20broken=20unit=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed logging labels hardcoded in expected message strings --- spec/file_finder_helper_spec.rb | 4 ++-- spec/tool_executor_helper_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/file_finder_helper_spec.rb b/spec/file_finder_helper_spec.rb index 329fad9a5..cb0458cbd 100644 --- a/spec/file_finder_helper_spec.rb +++ b/spec/file_finder_helper_spec.rb @@ -56,13 +56,13 @@ end it 'outputs a complaint if complain is warn' do - msg = 'WARNING: Found no file `d.c` in search paths.' + msg = 'Found no file `d.c` in search paths.' expect(@streaminator).to receive(:stream_puts).with(msg, Verbosity::COMPLAIN) @ff_helper.find_file_in_collection('d.c', FILE_LIST, :warn) end it 'outputs and raises an error if complain is error' do - msg = 'ERROR: Found no file `d.c` in search paths.' + msg = 'Found no file `d.c` in search paths.' allow(@streaminator).to receive(:stream_puts).with(msg, Verbosity::ERRORS) do expect{@ff_helper.find_file_in_collection('d.c', FILE_LIST, :warn)}.to raise_error end diff --git a/spec/tool_executor_helper_spec.rb b/spec/tool_executor_helper_spec.rb index 5fc20fd11..17e7c9b30 100644 --- a/spec/tool_executor_helper_spec.rb +++ b/spec/tool_executor_helper_spec.rb @@ -39,14 +39,14 @@ "\n".freeze ERROR_OUTPUT = - "ERROR: Shell command failed.\n" + + "Shell command failed.\n" + "> Shell executed command:\n" + "'gcc ab.c'\n" + "> And exited with status: [1].\n" + "\n" ERROR_OUTPUT_WITH_MESSAGE = - "ERROR: Shell command failed.\n" + + "Shell command failed.\n" + "> Shell executed command:\n" + "'gcc ab.c'\n" + "> Produced output:\n" +