From d9cb5e38142c776df0704d21ed4af1741758d950 Mon Sep 17 00:00:00 2001 From: Mike Karlesky Date: Tue, 30 Apr 2024 23:38:33 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Fixed=20broken=20tests=20with=20pro?= =?UTF-8?q?per=20loginator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/file_finder_helper_spec.rb | 2 +- ...nerator_test_results_sanity_checker_spec.rb | 2 +- spec/generator_test_results_spec.rb | 2 +- spec/tool_executor_helper_spec.rb | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/spec/file_finder_helper_spec.rb b/spec/file_finder_helper_spec.rb index f40e289c..ac771144 100644 --- a/spec/file_finder_helper_spec.rb +++ b/spec/file_finder_helper_spec.rb @@ -18,7 +18,7 @@ describe FileFinderHelper do before(:each) do # this will always be mocked - @loginator = loginator.new({:verbosinator => nil, :file_wrapper => nil, :system_wrapper => nil, :stream_wrapper => nil}) + @loginator = Loginator.new({:verbosinator => nil, :file_wrapper => nil, :system_wrapper => nil, :stream_wrapper => nil}) @ff_helper = described_class.new({:loginator => @loginator}) end diff --git a/spec/generator_test_results_sanity_checker_spec.rb b/spec/generator_test_results_sanity_checker_spec.rb index 3e6eebca..21d9dfbb 100644 --- a/spec/generator_test_results_sanity_checker_spec.rb +++ b/spec/generator_test_results_sanity_checker_spec.rb @@ -15,7 +15,7 @@ before(:each) do # this will always be mocked @configurator = Configurator.new({:configurator_setup => nil, :configurator_builder => nil, :configurator_plugins => nil, :yaml_wrapper => nil, :system_wrapper => nil}) - @loginator = loginator.new({:verbosinator => nil, :file_wrapper => nil, :system_wrapper => nil, :stream_wrapper => nil}) + @loginator = Loginator.new({:verbosinator => nil, :file_wrapper => nil, :system_wrapper => nil, :stream_wrapper => nil}) @sanity_checker = described_class.new({:configurator => @configurator, :loginator => @loginator}) diff --git a/spec/generator_test_results_spec.rb b/spec/generator_test_results_spec.rb index d828efb6..57271473 100644 --- a/spec/generator_test_results_spec.rb +++ b/spec/generator_test_results_spec.rb @@ -64,7 +64,7 @@ before(:each) do # these will always be mocked @configurator = Configurator.new({:configurator_setup => nil, :configurator_builder => nil, :configurator_plugins => nil, :yaml_wrapper => nil, :system_wrapper => nil}) - @loginator = loginator.new({:verbosinator => nil, :file_wrapper => nil, :system_wrapper => nil, :stream_wrapper => nil}) + @loginator = Loginator.new({:verbosinator => nil, :file_wrapper => nil, :system_wrapper => nil, :stream_wrapper => nil}) # these will always be used as is. @yaml_wrapper = YamlWrapper.new diff --git a/spec/tool_executor_helper_spec.rb b/spec/tool_executor_helper_spec.rb index d5ab8f02..c8536edd 100644 --- a/spec/tool_executor_helper_spec.rb +++ b/spec/tool_executor_helper_spec.rb @@ -58,12 +58,12 @@ describe ToolExecutorHelper do before(:each) do # these will always be mocked - @sys_wraper = SystemWrapper.new - @sys_utils = SystemUtils.new({:system_wrapper => @sys_wraper}) - @loginator = loginator.new({:verbosinator => nil, :file_wrapper => nil, :system_wrapper => nil, :stream_wrapper => @sys_wraper}) + @sys_wrapper = SystemWrapper.new + @sys_utils = SystemUtils.new({:system_wrapper => @sys_wrapper}) + @loginator = Loginator.new({:verbosinator => nil, :file_wrapper => nil, :system_wrapper => nil, :stream_wrapper => nil}) - @tool_exe_helper = described_class.new({:loginator => @loginator, :system_utils => @sys_utils, :system_wrapper => @sys_wraper}) + @tool_exe_helper = described_class.new({:loginator => @loginator, :system_utils => @sys_utils, :system_wrapper => @sys_wrapper}) end @@ -85,13 +85,13 @@ describe '#osify_path_separators' do it 'returns path if system is not windows' do exe = '/just/some/executable.out' - expect(@sys_wraper).to receive(:windows?).and_return(false) + expect(@sys_wrapper).to receive(:windows?).and_return(false) expect(@tool_exe_helper.osify_path_separators(exe)).to eq(exe) end it 'returns modifed if system is windows' do exe = '/just/some/executable.exe' - expect(@sys_wraper).to receive(:windows?).and_return(true) + expect(@sys_wrapper).to receive(:windows?).and_return(true) expect(@tool_exe_helper.osify_path_separators(exe)).to eq("\\just\\some\\executable.exe") end end @@ -119,18 +119,18 @@ it 'returns "2>&1" if system is windows' do - expect(@sys_wraper).to receive(:windows?).and_return(true) + expect(@sys_wrapper).to receive(:windows?).and_return(true) expect(@tool_exe_helper.stderr_redirect_cmdline_append(@tool_config)).to eq('2>&1') end it 'returns "|&" if system is tcsh' do - expect(@sys_wraper).to receive(:windows?).and_return(false) + expect(@sys_wrapper).to receive(:windows?).and_return(false) expect(@sys_utils).to receive(:tcsh_shell?).and_return(true) expect(@tool_exe_helper.stderr_redirect_cmdline_append(@tool_config)).to eq('|&') end it 'returns "2>&1" if system is unix' do - expect(@sys_wraper).to receive(:windows?).and_return(false) + expect(@sys_wrapper).to receive(:windows?).and_return(false) expect(@sys_utils).to receive(:tcsh_shell?).and_return(false) expect(@tool_exe_helper.stderr_redirect_cmdline_append(@tool_config)).to eq('2>&1') end