diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-07-23 16:34:56 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-07-23 16:34:56 -0700 |
commit | 4910a85d52b83d5971071ebaaa563beb23343979 (patch) | |
tree | 616eeb9eae79a619cd20cb6902e38906ab74274d | |
parent | c9c9615cda01e2284e77578f679cc9a9745c0da6 (diff) | |
download | chef-4910a85d52b83d5971071ebaaa563beb23343979.tar.gz |
fix unit testslcg/path-helper-allocations
since we construct the constant at class parsing time now, we can
no longer stub windows-vs-unix so we cannot stub the platform, so the
tests are platform-restricted now.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | chef-config/spec/unit/path_helper_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chef-config/spec/unit/path_helper_spec.rb b/chef-config/spec/unit/path_helper_spec.rb index aa670577d4..f416bb1826 100644 --- a/chef-config/spec/unit/path_helper_spec.rb +++ b/chef-config/spec/unit/path_helper_spec.rb @@ -55,7 +55,7 @@ RSpec.describe ChefConfig::PathHelper do end end - context "on windows" do + context "on windows", :windows_only do before(:each) do allow(ChefUtils).to receive(:windows?).and_return(true) @@ -103,7 +103,7 @@ RSpec.describe ChefConfig::PathHelper do end - context "on unix" do + context "on unix", :unix_only do before(:each) do allow(ChefUtils).to receive(:windows?).and_return(false) |