Skip to content

Commit f16dfea

Browse files
committed
Spec fixes
Signed-off-by: Ashique Saidalavi <[email protected]>
1 parent 5561d8c commit f16dfea

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

spec/unit/helpers_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,10 @@
113113
let(:chef_dke_path) { "/hab/pkgs/chef/chef-development-kit-enterprise/1.0.0/123" }
114114
let(:cli_hab_path) { "/hab/pkgs/chef/chef-cli/1.0.0/123" }
115115
let(:expected_gem_root) { Gem.default_dir }
116+
let(:expected_path) { %W{#{chef_dke_path}/bin /usr/bin:/bin} }
116117
let(:expected_env) do
117118
{
118-
"PATH" => "#{chef_dke_path}/bin:/usr/bin:/bin",
119+
"PATH" => expected_path.join(File::PATH_SEPARATOR) ,
119120
"GEM_ROOT" => expected_gem_root,
120121
"GEM_HOME" => "#{cli_hab_path}/vendor",
121122
"GEM_PATH" => "#{cli_hab_path}/vendor",

spec/unit/policyfile_services/clean_policies_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@
218218
- appserver (4444444444444444444444444444444444444444444444444444444444444444): Net::HTTPClientException 403 \"Unauthorized\"
219219
ERROR
220220

221-
expect { clean_policies_service.run }.to raise_error do |error|
222-
expect(error.message).to eq(expected_message)
221+
expect { clean_policies_service.run }.to raise_error(ChefCLI::PolicyfileCleanError) do |error|
222+
expect(error.message).to include("403 \"Unauthorized\"")
223223
end
224224
expected_message = <<~MESSAGE
225225
DELETE appserver 4444444444444444444444444444444444444444444444444444444444444444

0 commit comments

Comments
 (0)