summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-07-02 10:31:50 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-07-02 10:31:50 -0700
commitcdad2f684debda15e8cf773185e78f93892eda35 (patch)
tree24d815246b9130d040608b15a5a36d942e538587 /spec
parent34a6dd714503abbb0e6d240a4832f245d5c3ab06 (diff)
downloadchef-cdad2f684debda15e8cf773185e78f93892eda35.tar.gz
fix Layout/LeadingCommentSpace
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec')
-rw-r--r--spec/functional/knife/exec_spec.rb2
-rw-r--r--spec/functional/resource/link_spec.rb2
-rw-r--r--spec/functional/resource/registry_spec.rb12
-rw-r--r--spec/functional/resource/remote_file_spec.rb4
-rw-r--r--spec/functional/resource/windows_task_spec.rb76
-rw-r--r--spec/functional/run_lock_spec.rb2
-rw-r--r--spec/functional/win32/registry_spec.rb8
-rw-r--r--spec/support/shared/functional/securable_resource.rb4
-rw-r--r--spec/support/shared/unit/api_error_inspector.rb2
-rw-r--r--spec/support/shared/unit/provider/useradd_based_user_provider.rb2
-rw-r--r--spec/unit/application_spec.rb4
-rw-r--r--spec/unit/client_spec.rb2
-rw-r--r--spec/unit/cookbook/metadata_spec.rb4
-rw-r--r--spec/unit/daemon_spec.rb2
-rw-r--r--spec/unit/file_access_control_spec.rb4
-rw-r--r--spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb2
-rw-r--r--spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb2
-rw-r--r--spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb2
-rw-r--r--spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb2
-rw-r--r--spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb2
-rw-r--r--spec/unit/http/ssl_policies_spec.rb2
-rw-r--r--spec/unit/key_spec.rb4
-rw-r--r--spec/unit/knife/cookbook_site_install_spec.rb2
-rw-r--r--spec/unit/knife/cookbook_site_share_spec.rb4
-rw-r--r--spec/unit/knife/core/object_loader_spec.rb2
-rw-r--r--spec/unit/knife/key_create_spec.rb2
-rw-r--r--spec/unit/knife/role_env_run_list_add_spec.rb6
-rw-r--r--spec/unit/knife/role_run_list_add_spec.rb6
-rw-r--r--spec/unit/knife/ssl_check_spec.rb4
-rw-r--r--spec/unit/knife/user_delete_spec.rb2
-rw-r--r--spec/unit/knife_spec.rb4
-rw-r--r--spec/unit/lwrp_spec.rb2
-rw-r--r--spec/unit/mixin/securable_spec.rb8
-rw-r--r--spec/unit/node_spec.rb4
-rw-r--r--spec/unit/policy_builder/expand_node_object_spec.rb2
-rw-r--r--spec/unit/provider/git_spec.rb2
-rw-r--r--spec/unit/provider/link_spec.rb2
-rw-r--r--spec/unit/provider/package/freebsd/pkg_spec.rb18
-rw-r--r--spec/unit/provider/remote_file/ftp_spec.rb2
-rw-r--r--spec/unit/provider/remote_file/sftp_spec.rb2
-rw-r--r--spec/unit/provider/service/aixinit_service_spec.rb4
-rw-r--r--spec/unit/provider/service/upstart_service_spec.rb2
-rw-r--r--spec/unit/provider/windows_env_spec.rb4
-rw-r--r--spec/unit/provider/windows_task_spec.rb2
-rw-r--r--spec/unit/provider_resolver_spec.rb4
-rw-r--r--spec/unit/resource/cookbook_file_spec.rb2
-rw-r--r--spec/unit/resource/powershell_package_spec.rb2
-rw-r--r--spec/unit/resource_spec.rb2
-rw-r--r--spec/unit/role_spec.rb8
-rw-r--r--spec/unit/run_list_spec.rb2
-rw-r--r--spec/unit/shell/shell_session_spec.rb4
-rw-r--r--spec/unit/win32/registry_spec.rb2
52 files changed, 129 insertions, 129 deletions
diff --git a/spec/functional/knife/exec_spec.rb b/spec/functional/knife/exec_spec.rb
index ac8f617a90..7cdf1c93eb 100644
--- a/spec/functional/knife/exec_spec.rb
+++ b/spec/functional/knife/exec_spec.rb
@@ -21,7 +21,7 @@ require "tiny_server"
describe Chef::Knife::Exec do
before(:each) do
- @server = TinyServer::Manager.new #(:debug => true)
+ @server = TinyServer::Manager.new # (:debug => true)
@server.start
end
diff --git a/spec/functional/resource/link_spec.rb b/spec/functional/resource/link_spec.rb
index 2b8b509730..4464b6ed69 100644
--- a/spec/functional/resource/link_spec.rb
+++ b/spec/functional/resource/link_spec.rb
@@ -19,7 +19,7 @@
require "spec_helper"
if windows?
- require "chef/win32/file" #probably need this in spec_helper
+ require "chef/win32/file" # probably need this in spec_helper
require "chef/win32/security"
end
diff --git a/spec/functional/resource/registry_spec.rb b/spec/functional/resource/registry_spec.rb
index 2a11cdb63f..8de6577759 100644
--- a/spec/functional/resource/registry_spec.rb
+++ b/spec/functional/resource/registry_spec.rb
@@ -107,7 +107,7 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
reset_registry
end
- #Reporting setup
+ # Reporting setup
before do
@node.name("windowsbox")
@@ -569,7 +569,7 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
expect(@report["resources"][0]["id"]).to eq(reg_parent + '\ReportKey')
expect(@report["resources"][0]["before"][:values]).to eq([{ name: "ReportVal4", type: :string, data: "report4" },
{ name: "ReportVal5", type: :string, data: "report5" }])
- #Not testing for after values to match since after -> new_resource values.
+ # Not testing for after values to match since after -> new_resource values.
expect(@report["resources"][0]["result"]).to eq("delete")
expect(@report["status"]).to eq("success")
expect(@report["total_res_count"]).to eq("1")
@@ -622,7 +622,7 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
it "ignores the values under a key" do
@new_resource.key(reg_parent + '\OpscodeIgnoredValues')
- #@new_resource.values([{:name=>"DontExist", :type=>:string, :data=>"These will be ignored anyways"}])
+ # @new_resource.values([{:name=>"DontExist", :type=>:string, :data=>"These will be ignored anyways"}])
@new_resource.recursive(true)
@new_resource.run_action(:delete_key)
end
@@ -645,9 +645,9 @@ describe Chef::Resource::RegistryKey, :windows_only, broken: true do
expect(@report["resources"][0]["type"]).to eq("registry_key")
expect(@report["resources"][0]["name"]).to eq(resource_name)
expect(@report["resources"][0]["id"]).to eq(reg_parent + '\ReportKey')
- #Not testing for before or after values to match since
- #after -> new_resource.values and
- #before -> current_resource.values
+ # Not testing for before or after values to match since
+ # after -> new_resource.values and
+ # before -> current_resource.values
expect(@report["resources"][0]["result"]).to eq("delete_key")
expect(@report["status"]).to eq("success")
expect(@report["total_res_count"]).to eq("1")
diff --git a/spec/functional/resource/remote_file_spec.rb b/spec/functional/resource/remote_file_spec.rb
index 8e484b2968..a121cbb1f3 100644
--- a/spec/functional/resource/remote_file_spec.rb
+++ b/spec/functional/resource/remote_file_spec.rb
@@ -360,7 +360,7 @@ describe Chef::Resource::RemoteFile do
it "should raise ContentLengthMismatch" do
expect { resource.run_action(:create) }.to raise_error(Chef::Exceptions::ContentLengthMismatch)
- #File.should_not exist(path) # XXX: CHEF-5081
+ # File.should_not exist(path) # XXX: CHEF-5081
end
end
@@ -373,7 +373,7 @@ describe Chef::Resource::RemoteFile do
it "should raise ContentLengthMismatch" do
expect { resource.run_action(:create) }.to raise_error(Chef::Exceptions::ContentLengthMismatch)
- #File.should_not exist(path) # XXX: CHEF-5081
+ # File.should_not exist(path) # XXX: CHEF-5081
end
end
diff --git a/spec/functional/resource/windows_task_spec.rb b/spec/functional/resource/windows_task_spec.rb
index 46fbfe2e82..05f46d20ce 100644
--- a/spec/functional/resource/windows_task_spec.rb
+++ b/spec/functional/resource/windows_task_spec.rb
@@ -46,7 +46,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates scheduled task and sets command arguments" do
subject.command "chef-client -W"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
expect(current_resource.task.application_name).to eq("chef-client")
@@ -64,7 +64,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates scheduled task and sets command arguments" do
subject.command "chef-client -W -L 'C:\\chef\\chef-ad-join.log'"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
expect(current_resource.task.application_name).to eq("chef-client")
@@ -82,7 +82,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates scheduled task and sets command arguments" do
subject.command '"C:\\Program Files\\example\program.exe" -arg1 --arg2'
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
expect(current_resource.task.application_name).to eq("C:\\Program Files\\example\\program.exe")
@@ -100,7 +100,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates scheduled task and sets command arguments" do
subject.command "ping http://www.google.com"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
expect(current_resource.task.application_name).to eq("ping")
@@ -129,7 +129,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates a scheduled task to run every 1 hr starting on 09/20/2017" do
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
expect(current_resource.task.application_name).to eq(task_name)
@@ -161,7 +161,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates a scheduled task that runs after every 15 minutes" do
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -209,7 +209,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates a scheduled task that runs after every 3 hrs" do
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -254,7 +254,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates a scheduled task to run daily" do
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -289,7 +289,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "if day property is not set creates a scheduled task to run monthly on first day of the month" do
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -309,7 +309,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates a scheduled task to run monthly on first, second and third day of the month" do
subject.day "1, 2, 3"
call_for_create_action
- #loading current resource again to check new task is created and it matches task parameters
+ # loading current resource again to check new task is created and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -330,15 +330,15 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates a scheduled task to run monthly on 1, 2, 3, 4, 8, 20, 21, 15, 28, 31 day of the month" do
subject.day "1, 2, 3, 4, 8, 20, 21, 15, 28, 31"
call_for_create_action
- #loading current resource again to check new task is created and it matches task parameters
+ # loading current resource again to check new task is created and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
expect(current_resource.task.application_name).to eq(task_name)
expect(trigger_details[:trigger_type]).to eq(4)
expect(current_resource.task.principals[:run_level]).to eq(1)
- expect(trigger_details[:type][:days]).to eq(1209548943) #TODO:: windows_task_provider.send(:days_of_month)
- expect(trigger_details[:type][:months]).to eq(4095) #windows_task_provider.send(:months_of_year)
+ expect(trigger_details[:type][:days]).to eq(1209548943) # TODO:: windows_task_provider.send(:days_of_month)
+ expect(trigger_details[:type][:months]).to eq(4095) # windows_task_provider.send(:months_of_year)
end
it "does not converge the resource if it is already converged" do
@@ -352,15 +352,15 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject.day "1, 2, 3, 4, 8, 20, 21, 30"
subject.months "Jan, Feb, May, Sep, Dec"
call_for_create_action
- #loading current resource again to check new task is created and it matches task parameters
+ # loading current resource again to check new task is created and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
expect(current_resource.task.application_name).to eq(task_name)
expect(trigger_details[:trigger_type]).to eq(4)
expect(current_resource.task.principals[:run_level]).to eq(1)
- expect(trigger_details[:type][:days]).to eq(538443919) #TODO:windows_task_provider.send(:days_of_month)
- expect(trigger_details[:type][:months]).to eq(2323) #windows_task_provider.send(:months_of_year)
+ expect(trigger_details[:type][:days]).to eq(538443919) # TODO:windows_task_provider.send(:days_of_month)
+ expect(trigger_details[:type][:months]).to eq(2323) # windows_task_provider.send(:months_of_year)
end
it "does not converge the resource if it is already converged" do
@@ -375,7 +375,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject.frequency_modifier "First"
subject.day "Mon, Fri, Sun"
call_for_create_action
- #loading current resource again to check new task is created and it matches task parameters
+ # loading current resource again to check new task is created and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -384,7 +384,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
expect(current_resource.task.principals[:run_level]).to eq(1)
expect(trigger_details[:type][:days_of_week]).to eq(35)
expect(trigger_details[:type][:weeks_of_month]).to eq(1)
- expect(trigger_details[:type][:months]).to eq(4095) #windows_task_provider.send(:months_of_year)
+ expect(trigger_details[:type][:months]).to eq(4095) # windows_task_provider.send(:months_of_year)
end
it "does not converge the resource if it is already converged" do
@@ -606,7 +606,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject.day "2"
subject.start_day "03/07/2018"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -628,7 +628,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates a scheduled task to run monthly on first, second and third day of the month" do
subject.day "1,2,3"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -649,7 +649,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates a scheduled task to run monthly on each wednesday of the month" do
subject.frequency_modifier "1"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -657,7 +657,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
expect(trigger_details[:trigger_type]).to eq(4)
expect(current_resource.task.principals[:run_level]).to eq(1)
expect(trigger_details[:type][:days]).to eq(1)
- expect(trigger_details[:type][:months]).to eq(4095) #windows_task_provider.send(:months_of_year)
+ expect(trigger_details[:type][:months]).to eq(4095) # windows_task_provider.send(:months_of_year)
end
it "does not converge the resource if it is already converged" do
@@ -671,16 +671,16 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject.frequency_modifier "2"
subject.months = nil
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
- #loading current resource
+ # loading current resource
expect(current_resource.task.application_name).to eq(task_name)
expect(trigger_details[:trigger_type]).to eq(4)
expect(current_resource.task.principals[:run_level]).to eq(1)
expect(trigger_details[:type][:days]).to eq(1)
- expect(trigger_details[:type][:months]).to eq(2730) #windows_task_provider.send(:months_of_year)
+ expect(trigger_details[:type][:months]).to eq(2730) # windows_task_provider.send(:months_of_year)
end
it "does not converge the resource if it is already converged" do
@@ -714,7 +714,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates the scheduled task to run once at 5pm" do
subject.start_time "17:00"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -745,7 +745,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates the scheduled task to run weekly" do
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -765,7 +765,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates hte scheduled task for all days of week" do
subject.day "*"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -789,7 +789,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject.day "Mon, Fri"
subject.frequency_modifier 2
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -894,7 +894,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates the scheduled task to run at system start up" do
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -914,7 +914,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject.start_day "09/10/2018"
subject.start_time "15:00"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -941,7 +941,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates the scheduled task to on logon" do
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -961,7 +961,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject.start_day "09/10/2018"
subject.start_time "15:00"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -996,7 +996,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates the scheduled task to run when system is idle" do
subject.idle_time 20
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -1021,7 +1021,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject.start_day "09/10/2018"
subject.start_time "15:00"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -1049,7 +1049,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject.frequency :minute
subject.random_delay "20"
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
trigger_details = current_resource.task.trigger(0)
@@ -1092,7 +1092,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "creates the scheduled task to run on demand only" do
call_for_create_action
- #loading current resource again to check new task is creted and it matches task parameters
+ # loading current resource again to check new task is creted and it matches task parameters
current_resource = call_for_load_current_resource
expect(current_resource.exists).to eq(true)
@@ -1514,7 +1514,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
subject.run_action(:run)
subject.run_action(:end)
current_resource = call_for_load_current_resource
- expect(current_resource.task.status).to eq("queued").or eq("ready") #queued or can be ready
+ expect(current_resource.task.status).to eq("queued").or eq("ready") # queued or can be ready
end
end
diff --git a/spec/functional/run_lock_spec.rb b/spec/functional/run_lock_spec.rb
index c1942cff50..49972360ef 100644
--- a/spec/functional/run_lock_spec.rb
+++ b/spec/functional/run_lock_spec.rb
@@ -461,7 +461,7 @@ describe Chef::RunLock do
buffer << fd.read_nonblock(1) while buffer[-1] != "\n"
buffer
- #rescue IO::EAGAINUnreadable
+ # rescue IO::EAGAINUnreadable
rescue IO::WaitReadable
unless buffer == ""
sleep 0.1
diff --git a/spec/functional/win32/registry_spec.rb b/spec/functional/win32/registry_spec.rb
index c5323d3557..923b952161 100644
--- a/spec/functional/win32/registry_spec.rb
+++ b/spec/functional/win32/registry_spec.rb
@@ -23,7 +23,7 @@ require "chef/win32/registry"
describe "Chef::Win32::Registry", :windows_only do
before(:all) do
- #Create a registry item
+ # Create a registry item
::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root"
::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\Branch"
::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\B®anch"
@@ -39,17 +39,17 @@ describe "Chef::Win32::Registry", :windows_only do
reg["Petals", Win32::Registry::REG_MULTI_SZ] = %w{Pink Delicate}
end
- #Create the node with ohai data
+ # Create the node with ohai data
events = Chef::EventDispatch::Dispatcher.new
@node = Chef::Node.new
@node.consume_external_attrs(OHAI_SYSTEM.data, {})
@run_context = Chef::RunContext.new(@node, {}, events)
- #Create a registry object that has access ot the node previously created
+ # Create a registry object that has access ot the node previously created
@registry = Chef::Win32::Registry.new(@run_context)
end
- #Delete what is left of the registry key-values previously created
+ # Delete what is left of the registry key-values previously created
after(:all) do
::Win32::Registry::HKEY_CURRENT_USER.open("Software") do |reg|
reg.delete_key("Root", true)
diff --git a/spec/support/shared/functional/securable_resource.rb b/spec/support/shared/functional/securable_resource.rb
index 0df006cccc..2abae030c2 100644
--- a/spec/support/shared/functional/securable_resource.rb
+++ b/spec/support/shared/functional/securable_resource.rb
@@ -443,8 +443,8 @@ shared_examples_for "a securable resource without existing target" do
end
it "respects mode in string form as an octal number" do
- #on windows, mode cannot modify owner and/or group permissons
- #unless the owner and/or group as appropriate is specified
+ # on windows, mode cannot modify owner and/or group permissons
+ # unless the owner and/or group as appropriate is specified
resource.mode "400"
resource.owner "Guest"
resource.group "Everyone"
diff --git a/spec/support/shared/unit/api_error_inspector.rb b/spec/support/shared/unit/api_error_inspector.rb
index 06f2e4bb57..15c122e3dc 100644
--- a/spec/support/shared/unit/api_error_inspector.rb
+++ b/spec/support/shared/unit/api_error_inspector.rb
@@ -36,7 +36,7 @@ shared_examples_for "an api error inspector" do
}
@description = Chef::Formatters::ErrorDescription.new("Error registering the node:")
@outputter = Chef::Formatters::IndentableOutputStream.new(StringIO.new, STDERR)
- #@outputter = Chef::Formatters::IndentableOutputStream.new(STDOUT, STDERR)
+ # @outputter = Chef::Formatters::IndentableOutputStream.new(STDOUT, STDERR)
end
diff --git a/spec/support/shared/unit/provider/useradd_based_user_provider.rb b/spec/support/shared/unit/provider/useradd_based_user_provider.rb
index 3e48cdf92d..a30f543e72 100644
--- a/spec/support/shared/unit/provider/useradd_based_user_provider.rb
+++ b/spec/support/shared/unit/provider/useradd_based_user_provider.rb
@@ -266,7 +266,7 @@ shared_examples_for "a useradd-based user provider" do |supported_useradd_option
# :nil_object => true,
# :username => "adam"
# )
- #provider = Chef::Provider::User::Useradd.new(@node, @new_resource)
+ # provider = Chef::Provider::User::Useradd.new(@node, @new_resource)
@stdout = "root P 09/02/2008 0 99999 7 -1"
@stderr = ""
end
diff --git a/spec/unit/application_spec.rb b/spec/unit/application_spec.rb
index a342fbd8bf..b8d7242466 100644
--- a/spec/unit/application_spec.rb
+++ b/spec/unit/application_spec.rb
@@ -107,7 +107,7 @@ describe Chef::Application do
it "should parse the commandline options" do
expect(@app).to receive(:parse_options).and_return(true)
- @app.config[:config_file] = "/etc/chef/default.rb" #have a config file set, to prevent triggering error block
+ @app.config[:config_file] = "/etc/chef/default.rb" # have a config file set, to prevent triggering error block
@app.configure_chef
end
@@ -138,7 +138,7 @@ describe Chef::Application do
end
it "should merge the local config hash into chef::config" do
- #File.should_receive(:open).with("/etc/chef/default.rb").and_yield(@config_file)
+ # File.should_receive(:open).with("/etc/chef/default.rb").and_yield(@config_file)
@app.configure_chef
expect(Chef::Config.rspec_ran).to eq("true")
end
diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb
index b39dde297e..4f9d66d776 100644
--- a/spec/unit/client_spec.rb
+++ b/spec/unit/client_spec.rb
@@ -488,7 +488,7 @@ EOM
context "fatal admin check is configured" do
it "should not raise an exception" do
- client.do_windows_admin_check #should not raise
+ client.do_windows_admin_check # should not raise
end
end
end
diff --git a/spec/unit/cookbook/metadata_spec.rb b/spec/unit/cookbook/metadata_spec.rb
index 7d7b6137bb..4da1c57964 100644
--- a/spec/unit/cookbook/metadata_spec.rb
+++ b/spec/unit/cookbook/metadata_spec.rb
@@ -558,14 +558,14 @@ describe Chef::Cookbook::Metadata do
expect do
metadata.attribute("db/mysql/databases", required: true)
end.not_to raise_error
- #attrib = metadata.attributes["db/mysql/databases"][:required].should == "required"
+ # attrib = metadata.attributes["db/mysql/databases"][:required].should == "required"
end
it "should convert required false to optional" do
expect do
metadata.attribute("db/mysql/databases", required: false)
end.not_to raise_error
- #attrib = metadata.attributes["db/mysql/databases"][:required].should == "optional"
+ # attrib = metadata.attributes["db/mysql/databases"][:required].should == "optional"
end
it "should set required to 'optional' by default" do
diff --git a/spec/unit/daemon_spec.rb b/spec/unit/daemon_spec.rb
index ffcdb71259..6722fbe12c 100644
--- a/spec/unit/daemon_spec.rb
+++ b/spec/unit/daemon_spec.rb
@@ -24,7 +24,7 @@ describe Chef::Daemon do
before do
if windows?
- mock_struct = #Struct::Passwd.new(nil, nil, 111, 111)
+ mock_struct = # Struct::Passwd.new(nil, nil, 111, 111)
mock_struct = OpenStruct.new(uid: 2342, gid: 2342)
allow(Etc).to receive(:getpwnam).and_return mock_struct
allow(Etc).to receive(:getgrnam).and_return mock_struct
diff --git a/spec/unit/file_access_control_spec.rb b/spec/unit/file_access_control_spec.rb
index de23fea1f3..b9ef45dd5c 100644
--- a/spec/unit/file_access_control_spec.rb
+++ b/spec/unit/file_access_control_spec.rb
@@ -273,7 +273,7 @@ describe Chef::FileAccessControl do
it "sets the file's mode as specified in the resource when the current modes are incorrect" do
# stat returns modes like 0100644 (octal) => 33188 (decimal)
- #@fac.stub(:stat).and_return(OpenStruct.new(:mode => 33188))
+ # @fac.stub(:stat).and_return(OpenStruct.new(:mode => 33188))
@current_resource.mode("0644")
expect(File).to receive(:chmod).with(256, "/tmp/different_file.txt")
@fac.set_mode
@@ -286,7 +286,7 @@ describe Chef::FileAccessControl do
end
it "does not set the file's mode when the current modes are correct" do
- #@fac.stub(:stat).and_return(OpenStruct.new(:mode => 0100400))
+ # @fac.stub(:stat).and_return(OpenStruct.new(:mode => 0100400))
@current_resource.mode("0400")
expect(File).not_to receive(:chmod)
@fac.set_mode
diff --git a/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb b/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb
index 02846af24a..437cc3ee49 100644
--- a/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb
+++ b/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb
@@ -22,7 +22,7 @@ describe Chef::Formatters::ErrorInspectors::CookbookSyncErrorInspector do
before do
@description = Chef::Formatters::ErrorDescription.new("Error Expanding RunList:")
@outputter = Chef::Formatters::IndentableOutputStream.new(StringIO.new, STDERR)
- #@outputter = Chef::Formatters::IndentableOutputStream.new(STDOUT, STDERR)
+ # @outputter = Chef::Formatters::IndentableOutputStream.new(STDOUT, STDERR)
end
describe "when explaining a 502 error" do
diff --git a/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb b/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb
index 93aac417fa..84a3804dc2 100644
--- a/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb
+++ b/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb
@@ -19,7 +19,7 @@
require "spec_helper"
# spec_helper loads the shared examples already.
-#require 'support/shared/unit/api_error_inspector_spec'
+# require 'support/shared/unit/api_error_inspector_spec'
describe Chef::Formatters::ErrorInspectors::NodeLoadErrorInspector do
it_behaves_like "an api error inspector"
diff --git a/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb b/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb
index cea93888eb..63a841ccda 100644
--- a/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb
+++ b/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb
@@ -19,7 +19,7 @@
require "spec_helper"
# spec_helper loads the shared examples already.
-#require 'support/shared/unit/api_error_inspector_spec'
+# require 'support/shared/unit/api_error_inspector_spec'
describe Chef::Formatters::ErrorInspectors::RegistrationErrorInspector do
it_behaves_like "an api error inspector"
diff --git a/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb b/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb
index 072dcfef28..0cdb06c3b3 100644
--- a/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb
+++ b/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb
@@ -40,7 +40,7 @@ describe Chef::Formatters::ErrorInspectors::ResourceFailureInspector do
@description = Chef::Formatters::ErrorDescription.new("Error Converging Resource:")
@stdout = StringIO.new
@outputter = Chef::Formatters::IndentableOutputStream.new(@stdout, STDERR)
- #@outputter = Chef::Formatters::IndentableOutputStream.new(STDOUT, STDERR)
+ # @outputter = Chef::Formatters::IndentableOutputStream.new(STDOUT, STDERR)
allow(Chef::Config).to receive(:cookbook_path).and_return([ "/var/chef/cache" ])
end
diff --git a/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb b/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb
index 6c03750136..70cf96f7c9 100644
--- a/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb
+++ b/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb
@@ -27,7 +27,7 @@ describe Chef::Formatters::ErrorInspectors::RunListExpansionErrorInspector do
@description = Chef::Formatters::ErrorDescription.new("Error Expanding RunList:")
@outputter = Chef::Formatters::IndentableOutputStream.new(StringIO.new, STDERR)
- #@outputter = Chef::Formatters::IndentableOutputStream.new(STDOUT, STDERR)
+ # @outputter = Chef::Formatters::IndentableOutputStream.new(STDOUT, STDERR)
end
describe "when explaining a missing role error" do
diff --git a/spec/unit/http/ssl_policies_spec.rb b/spec/unit/http/ssl_policies_spec.rb
index df6dee1198..b67ecc84de 100644
--- a/spec/unit/http/ssl_policies_spec.rb
+++ b/spec/unit/http/ssl_policies_spec.rb
@@ -145,7 +145,7 @@ describe "HTTP SSL Policy" do
# For whatever reason, OpenSSL errors out when adding a
# cert you already have to the certificate store.
ssl_policy.set_custom_certs
- ssl_policy.set_custom_certs #should not raise an error
+ ssl_policy.set_custom_certs # should not raise an error
end
end
end
diff --git a/spec/unit/key_spec.rb b/spec/unit/key_spec.rb
index 0809483577..ea2eae3df7 100644
--- a/spec/unit/key_spec.rb
+++ b/spec/unit/key_spec.rb
@@ -564,7 +564,7 @@ EOS
end
end
- end #update
+ end # update
describe "load" do
shared_examples_for "load" do
@@ -592,7 +592,7 @@ EOS
end
end
- end #load
+ end # load
describe "destroy" do
shared_examples_for "destroy key" do
diff --git a/spec/unit/knife/cookbook_site_install_spec.rb b/spec/unit/knife/cookbook_site_install_spec.rb
index d5df88c997..4e9c7b6265 100644
--- a/spec/unit/knife/cookbook_site_install_spec.rb
+++ b/spec/unit/knife/cookbook_site_install_spec.rb
@@ -173,7 +173,7 @@ describe Chef::Knife::CookbookSiteInstall do
it "returns a populated Metadata object if metadata.json exists" do
allow(File).to receive(:exist?).with(json_metadata_path).and_return(true)
- #expect(IO).to receive(:read).with(json_metadata_path)
+ # expect(IO).to receive(:read).with(json_metadata_path)
allow(IO).to receive(:read)
expect(metadata).to receive(:from_json)
knife.preferred_metadata
diff --git a/spec/unit/knife/cookbook_site_share_spec.rb b/spec/unit/knife/cookbook_site_share_spec.rb
index ac12536d6e..773c1a78c3 100644
--- a/spec/unit/knife/cookbook_site_share_spec.rb
+++ b/spec/unit/knife/cookbook_site_share_spec.rb
@@ -199,8 +199,8 @@ describe Chef::Knife::CookbookSiteShare do
response_text = Chef::JSONCompat.to_json({ system_error: "Your call was dropped", reason: "There's a map for that" })
allow(@upload_response).to receive(:body).and_return(response_text)
allow(@upload_response).to receive(:code).and_return(500)
- expect(@knife.ui).to receive(:error).with(/#{Regexp.escape(response_text)}/) #.ordered
- expect(@knife.ui).to receive(:error).with(/Unknown error/) #.ordered
+ expect(@knife.ui).to receive(:error).with(/#{Regexp.escape(response_text)}/) # .ordered
+ expect(@knife.ui).to receive(:error).with(/Unknown error/) # .ordered
expect { @knife.run }.to raise_error(SystemExit)
end
diff --git a/spec/unit/knife/core/object_loader_spec.rb b/spec/unit/knife/core/object_loader_spec.rb
index 9cabf2ba63..6eb392acae 100644
--- a/spec/unit/knife/core/object_loader_spec.rb
+++ b/spec/unit/knife/core/object_loader_spec.rb
@@ -57,7 +57,7 @@ describe Chef::Knife::Core::ObjectLoader do
it_behaves_like "Chef object", chef_class
end
- #NOTE: This is check for the bug described at CHEF-2352
+ # NOTE: This is check for the bug described at CHEF-2352
describe "when the file is a JSON" do
describe "and it has defined 'json_class'" do
before do
diff --git a/spec/unit/knife/key_create_spec.rb b/spec/unit/knife/key_create_spec.rb
index 2d882b87e0..fcbfd40381 100644
--- a/spec/unit/knife/key_create_spec.rb
+++ b/spec/unit/knife/key_create_spec.rb
@@ -207,7 +207,7 @@ Tfuc9dUYsFjptWYrV6pfEQ+bgo1OGBXORBFcFL+2D7u9JYquKrMgosznHoEkQNLo
end
end # when the server returns a private key
end # when the command is run
- end #key create run command"
+ end # key create run command"
context "when actor_field_name is 'user'" do
it_should_behave_like "key create run command" do
diff --git a/spec/unit/knife/role_env_run_list_add_spec.rb b/spec/unit/knife/role_env_run_list_add_spec.rb
index e679b88295..242beeb4a2 100644
--- a/spec/unit/knife/role_env_run_list_add_spec.rb
+++ b/spec/unit/knife/role_env_run_list_add_spec.rb
@@ -85,17 +85,17 @@ describe Chef::Knife::RoleEnvRunListAdd do
end
it "should add to the run list after the specified entries in the QA run list" do
- #Setup
+ # Setup
@role.run_list_for("_default") << "role[acorns]"
@role.run_list_for("_default") << "role[barn]"
@knife.run
@role.run_list_for("QA") << "role[pencil]"
@role.run_list_for("QA") << "role[pen]"
- #Configuration we are testing
+ # Configuration we are testing
@knife.config[:after] = "role[pencil]"
@knife.name_args = [ "will", "QA", "role[pad]", "role[whackadoo]" ]
@knife.run
- #The actual tests
+ # The actual tests
expect(@role.run_list_for("QA")[0]).to eq("role[monkey]")
expect(@role.run_list_for("QA")[1]).to eq("role[pencil]")
expect(@role.run_list_for("QA")[2]).to eq("role[pad]")
diff --git a/spec/unit/knife/role_run_list_add_spec.rb b/spec/unit/knife/role_run_list_add_spec.rb
index 3358da130c..a38b6de9da 100644
--- a/spec/unit/knife/role_run_list_add_spec.rb
+++ b/spec/unit/knife/role_run_list_add_spec.rb
@@ -74,14 +74,14 @@ describe Chef::Knife::RoleRunListAdd do
end
it "should add to the run list after the specified entries in the default run list" do
- #Setup
+ # Setup
@role.run_list_for("_default") << "role[acorns]"
@role.run_list_for("_default") << "role[barn]"
- #Configuration we are testing
+ # Configuration we are testing
@knife.config[:after] = "role[acorns]"
@knife.name_args = [ "will", "role[pad]", "role[whackadoo]" ]
@knife.run
- #The actual tests
+ # The actual tests
expect(@role.run_list[0]).to eq("role[acorns]")
expect(@role.run_list[1]).to eq("role[pad]")
expect(@role.run_list[2]).to eq("role[whackadoo]")
diff --git a/spec/unit/knife/ssl_check_spec.rb b/spec/unit/knife/ssl_check_spec.rb
index a25c8b759c..9092110b95 100644
--- a/spec/unit/knife/ssl_check_spec.rb
+++ b/spec/unit/knife/ssl_check_spec.rb
@@ -168,8 +168,8 @@ E
def run
ssl_check.run
rescue Exception
- #puts "OUT: #{stdout_io.string}"
- #puts "ERR: #{stderr_io.string}"
+ # puts "OUT: #{stdout_io.string}"
+ # puts "ERR: #{stderr_io.string}"
raise
end
diff --git a/spec/unit/knife/user_delete_spec.rb b/spec/unit/knife/user_delete_spec.rb
index 0f71b39a41..68749fe727 100644
--- a/spec/unit/knife/user_delete_spec.rb
+++ b/spec/unit/knife/user_delete_spec.rb
@@ -51,7 +51,7 @@ describe Chef::Knife::UserDelete do
end
it "deletes the user" do
- #expect(knife).to receive(:delete_object).with(Chef::UserV1, 'my_user')
+ # expect(knife).to receive(:delete_object).with(Chef::UserV1, 'my_user')
expect(knife).to receive(:delete_object).with("my_user")
knife.run
end
diff --git a/spec/unit/knife_spec.rb b/spec/unit/knife_spec.rb
index 443e21659e..c091286077 100644
--- a/spec/unit/knife_spec.rb
+++ b/spec/unit/knife_spec.rb
@@ -300,14 +300,14 @@ describe Chef::Knife do
end
it "prefers the default value if no config or command line value is present" do
- knife_command = KnifeSpecs::TestYourself.new([]) #empty argv
+ knife_command = KnifeSpecs::TestYourself.new([]) # empty argv
knife_command.configure_chef
expect(knife_command.config[:opt_with_default]).to eq("default-value")
end
it "prefers a value in Chef::Config[:knife] to the default" do
Chef::Config[:knife][:opt_with_default] = "from-knife-config"
- knife_command = KnifeSpecs::TestYourself.new([]) #empty argv
+ knife_command = KnifeSpecs::TestYourself.new([]) # empty argv
knife_command.configure_chef
expect(knife_command.config[:opt_with_default]).to eq("from-knife-config")
end
diff --git a/spec/unit/lwrp_spec.rb b/spec/unit/lwrp_spec.rb
index 3776372965..a7f95f8bfd 100644
--- a/spec/unit/lwrp_spec.rb
+++ b/spec/unit/lwrp_spec.rb
@@ -520,7 +520,7 @@ describe "LWRP" do
resource.provider(get_dynamic_lwrp_provider(:lwrp_embedded_resource_accesses_providers_scope))
provider = resource.provider_for_action(:twiddle_thumbs)
- #provider = @runner.build_provider(resource)
+ # provider = @runner.build_provider(resource)
provider.action_twiddle_thumbs
expect(provider.enclosed_resource.monkey).to eq("bob, the monkey")
diff --git a/spec/unit/mixin/securable_spec.rb b/spec/unit/mixin/securable_spec.rb
index 7ec39ac63f..de95aa2614 100644
--- a/spec/unit/mixin/securable_spec.rb
+++ b/spec/unit/mixin/securable_spec.rb
@@ -117,10 +117,10 @@ describe Chef::Mixin::Securable do
it "should not accept group/owner names containing embedded carriage returns" do
skip "XXX: params_validate needs to be extended to support multi-line regex"
- #lambda { @securable.group "\ntest" }.should raise_error(ArgumentError)
- #lambda { @securable.group "te\nst" }.should raise_error(ArgumentError)
- #lambda { @securable.owner "\ntest" }.should raise_error(ArgumentError)
- #lambda { @securable.owner "te\nst" }.should raise_error(ArgumentError)
+ # lambda { @securable.group "\ntest" }.should raise_error(ArgumentError)
+ # lambda { @securable.group "te\nst" }.should raise_error(ArgumentError)
+ # lambda { @securable.owner "\ntest" }.should raise_error(ArgumentError)
+ # lambda { @securable.owner "te\nst" }.should raise_error(ArgumentError)
end
it "should accept group/owner names in UTF-8" do
diff --git a/spec/unit/node_spec.rb b/spec/unit/node_spec.rb
index ee0f969f6d..0ca5f83adc 100644
--- a/spec/unit/node_spec.rb
+++ b/spec/unit/node_spec.rb
@@ -1282,8 +1282,8 @@ describe Chef::Node do
end
it "should serialize valid json with a run list", json: true do
- #This test came about because activesupport mucks with Chef json serialization
- #Test should pass with and without Activesupport
+ # This test came about because activesupport mucks with Chef json serialization
+ # Test should pass with and without Activesupport
node.run_list << { "type" => "role", "name" => "Cthulu" }
node.run_list << { "type" => "role", "name" => "Hastur" }
json = Chef::JSONCompat.to_json(node)
diff --git a/spec/unit/policy_builder/expand_node_object_spec.rb b/spec/unit/policy_builder/expand_node_object_spec.rb
index 438e0805e7..122c960c11 100644
--- a/spec/unit/policy_builder/expand_node_object_spec.rb
+++ b/spec/unit/policy_builder/expand_node_object_spec.rb
@@ -48,7 +48,7 @@ describe Chef::PolicyBuilder::ExpandNodeObject do
it "implements a setup_run_context method that accepts a list of recipe files to run" do
expect(policy_builder).to respond_to(:setup_run_context)
- expect(policy_builder.method(:setup_run_context).arity).to eq(-1) #optional argument
+ expect(policy_builder.method(:setup_run_context).arity).to eq(-1) # optional argument
end
it "implements a run_context method" do
diff --git a/spec/unit/provider/git_spec.rb b/spec/unit/provider/git_spec.rb
index 9baad64ea3..4a6266b58a 100644
--- a/spec/unit/provider/git_spec.rb
+++ b/spec/unit/provider/git_spec.rb
@@ -707,7 +707,7 @@ SHAS
expect(@provider).to receive(:action_checkout)
expect(@provider).not_to receive(:shell_out!).with("huzzah!", cwd: "/my/deploy/dir")
@provider.run_action(:sync)
- #@resource.should be_updated
+ # @resource.should be_updated
end
it "does an export by cloning the repo then removing the .git directory" do
diff --git a/spec/unit/provider/link_spec.rb b/spec/unit/provider/link_spec.rb
index 8f1ec8c3ba..027b318c7e 100644
--- a/spec/unit/provider/link_spec.rb
+++ b/spec/unit/provider/link_spec.rb
@@ -22,7 +22,7 @@ require "ostruct"
require "spec_helper"
if Chef::Platform.windows?
- require "chef/win32/file" #probably need this in spec_helper
+ require "chef/win32/file" # probably need this in spec_helper
end
describe Chef::Resource::Link do
diff --git a/spec/unit/provider/package/freebsd/pkg_spec.rb b/spec/unit/provider/package/freebsd/pkg_spec.rb
index 6ad6813503..8c3e25a0f9 100644
--- a/spec/unit/provider/package/freebsd/pkg_spec.rb
+++ b/spec/unit/provider/package/freebsd/pkg_spec.rb
@@ -66,15 +66,15 @@ describe Chef::Provider::Package::Freebsd::Pkg, "load_current_resource" do
describe "when querying for package state and attributes" do
before do
- #@new_resource = Chef::Resource::Package.new("zsh")
+ # @new_resource = Chef::Resource::Package.new("zsh")
- #@provider = Chef::Provider::Package::Freebsd::Pkg.new(@node, @new_resource)
+ # @provider = Chef::Provider::Package::Freebsd::Pkg.new(@node, @new_resource)
- #@status = double("Status", :exitstatus => 0)
- #@stdin = double("STDIN", :null_object => true)
- #@stdout = double("STDOUT", :null_object => true)
- #@stderr = double("STDERR", :null_object => true)
- #@pid = double("PID", :null_object => true)
+ # @status = double("Status", :exitstatus => 0)
+ # @stdin = double("STDIN", :null_object => true)
+ # @stdout = double("STDOUT", :null_object => true)
+ # @stderr = double("STDERR", :null_object => true)
+ # @pid = double("PID", :null_object => true)
end
it "should return the version number when it is installed" do
@@ -111,7 +111,7 @@ describe Chef::Provider::Package::Freebsd::Pkg, "load_current_resource" do
allow(@provider).to receive(:port_path).and_return("/usr/ports/shells/zsh")
make_v = OpenStruct.new(stdout: "zsh-4.3.6_7\n", exitstatus: 0)
expect(@provider).to receive(:shell_out_compacted!).with("make", "-V", "PKGNAME", { cwd: "/usr/ports/shells/zsh", env: nil, returns: [0, 1], timeout: 900 }).and_return(make_v)
- #@provider.should_receive(:ports_makefile_variable_value).with("PKGNAME").and_return("zsh-4.3.6_7")
+ # @provider.should_receive(:ports_makefile_variable_value).with("PKGNAME").and_return("zsh-4.3.6_7")
expect(@provider.package_name).to eq("zsh")
end
end
@@ -134,7 +134,7 @@ describe Chef::Provider::Package::Freebsd::Pkg, "load_current_resource" do
describe Chef::Provider::Package::Freebsd::Pkg, "port path" do
before do
- #@node = Chef::Node.new
+ # @node = Chef::Node.new
@new_resource = Chef::Resource::Package.new("zsh")
@new_resource.cookbook_name = "adventureclub"
@provider = Chef::Provider::Package::Freebsd::Pkg.new(@new_resource, @run_context)
diff --git a/spec/unit/provider/remote_file/ftp_spec.rb b/spec/unit/provider/remote_file/ftp_spec.rb
index b2fbb7300c..72bb910e66 100644
--- a/spec/unit/provider/remote_file/ftp_spec.rb
+++ b/spec/unit/provider/remote_file/ftp_spec.rb
@@ -108,7 +108,7 @@ describe Chef::Provider::RemoteFile::FTP do
before do
current_resource.checksum(current_resource_checksum)
- #Chef::Provider::RemoteFile::CacheControlData.should_receive(:load_and_validate).with(uri, current_resource_checksum).and_return(cache_control_data)
+ # Chef::Provider::RemoteFile::CacheControlData.should_receive(:load_and_validate).with(uri, current_resource_checksum).and_return(cache_control_data)
end
it "should connect to the host from the uri on the default port 21" do
diff --git a/spec/unit/provider/remote_file/sftp_spec.rb b/spec/unit/provider/remote_file/sftp_spec.rb
index d8fff87dec..244440d5c3 100644
--- a/spec/unit/provider/remote_file/sftp_spec.rb
+++ b/spec/unit/provider/remote_file/sftp_spec.rb
@@ -19,7 +19,7 @@
require "spec_helper"
describe Chef::Provider::RemoteFile::SFTP do
- #built out dependencies
+ # built out dependencies
let(:enclosing_directory) do
canonicalize_path(File.expand_path(File.join(CHEF_SPEC_DATA, "templates")))
end
diff --git a/spec/unit/provider/service/aixinit_service_spec.rb b/spec/unit/provider/service/aixinit_service_spec.rb
index 725d6e210c..6a586a0240 100644
--- a/spec/unit/provider/service/aixinit_service_spec.rb
+++ b/spec/unit/provider/service/aixinit_service_spec.rb
@@ -209,7 +209,7 @@ describe Chef::Provider::Service::AixInit do
before do
@files = ["/etc/rc.d/rc2.d/S20apache", "/etc/rc.d/rc2.d/K80apache"]
# FIXME: this is clearly buggy the duplicated keys do not work
- #@priority = {2 => [:start, 20], 2 => [:stop, 80]}
+ # @priority = {2 => [:start, 20], 2 => [:stop, 80]}
@priority = { 2 => [:stop, 80] }
allow(Dir).to receive(:glob).with(["/etc/rc.d/rc2.d/[SK][0-9][0-9]#{@new_resource.service_name}", "/etc/rc.d/rc2.d/[SK]chef"]).and_return(@files)
@@ -256,7 +256,7 @@ describe Chef::Provider::Service::AixInit do
before do
files = ["/etc/rc.d/rc2.d/Sapache", "/etc/rc.d/rc2.d/Kapache"]
# FIXME: this is clearly buggy the duplicated keys do not work
- #@priority = {2 => [:start, ''], 2 => [:stop, '']}
+ # @priority = {2 => [:start, ''], 2 => [:stop, '']}
@priority = { 2 => [:stop, ""] }
allow(Dir).to receive(:glob).with(["/etc/rc.d/rc2.d/[SK][0-9][0-9]#{@new_resource.service_name}", "/etc/rc.d/rc2.d/[SK]#{@new_resource.service_name}"]).and_return(files)
diff --git a/spec/unit/provider/service/upstart_service_spec.rb b/spec/unit/provider/service/upstart_service_spec.rb
index ae94e49835..365201cb38 100644
--- a/spec/unit/provider/service/upstart_service_spec.rb
+++ b/spec/unit/provider/service/upstart_service_spec.rb
@@ -43,7 +43,7 @@ describe Chef::Provider::Service::Upstart do
it "should return /etc/event.d as the upstart job directory when running on Ubuntu 9.04" do
@node.automatic_attrs[:platform_version] = "9.04"
- #Chef::Platform.stub(:find_platform_and_version).and_return([ "ubuntu", "9.04" ])
+ # Chef::Platform.stub(:find_platform_and_version).and_return([ "ubuntu", "9.04" ])
@provider = Chef::Provider::Service::Upstart.new(@new_resource, @run_context)
expect(@provider.instance_variable_get(:@upstart_job_dir)).to eq("/etc/event.d")
expect(@provider.instance_variable_get(:@upstart_conf_suffix)).to eq("")
diff --git a/spec/unit/provider/windows_env_spec.rb b/spec/unit/provider/windows_env_spec.rb
index a42a0509c5..0e6cb02d48 100644
--- a/spec/unit/provider/windows_env_spec.rb
+++ b/spec/unit/provider/windows_env_spec.rb
@@ -36,8 +36,8 @@ describe Chef::Provider::WindowsEnv, :windows_only do
describe "when loading the current status" do
before do
- #@current_resource = @new_resource.clone
- #Chef::Resource::Env.stub(:new).and_return(@current_resource)
+ # @current_resource = @new_resource.clone
+ # Chef::Resource::Env.stub(:new).and_return(@current_resource)
@provider.current_resource = @current_resource
allow(@provider).to receive(:env_value).with("FOO").and_return("bar")
allow(@provider).to receive(:env_key_exists).and_return(true)
diff --git a/spec/unit/provider/windows_task_spec.rb b/spec/unit/provider/windows_task_spec.rb
index 39f39b37fe..f69ba49547 100644
--- a/spec/unit/provider/windows_task_spec.rb
+++ b/spec/unit/provider/windows_task_spec.rb
@@ -286,7 +286,7 @@ describe Chef::Provider::WindowsTask, :windows_only do
end
end
- #Ref : https://msdn.microsoft.com/en-us/library/windows/desktop/aa380729(v=vs.85).aspx
+ # Ref : https://msdn.microsoft.com/en-us/library/windows/desktop/aa380729(v=vs.85).aspx
describe "#days_of_week" do
it "returns the binary value 2 if day is set as 'Mon'" do
new_resource.day "Mon"
diff --git a/spec/unit/provider_resolver_spec.rb b/spec/unit/provider_resolver_spec.rb
index 66b53b2f4a..cb03141c76 100644
--- a/spec/unit/provider_resolver_spec.rb
+++ b/spec/unit/provider_resolver_spec.rb
@@ -27,7 +27,7 @@ require "fileutils"
include Chef::Mixin::ConvertToClassName
# Open up Provider so we can write things down easier in here
-#module Chef::Provider
+# module Chef::Provider
describe Chef::ProviderResolver do
include IntegrationSupport
@@ -428,7 +428,7 @@ describe Chef::ProviderResolver do
# old debian uses the Debian provider (does not have insserv or upstart, or update-rc.d???)
on_platform "debian", platform_version: "4.0", os: "linux" do
- #it_behaves_like "a debian platform using the debian provider"
+ # it_behaves_like "a debian platform using the debian provider"
end
# Debian replaced the debian provider with insserv in the FIXME:VERSION distro
diff --git a/spec/unit/resource/cookbook_file_spec.rb b/spec/unit/resource/cookbook_file_spec.rb
index c670d2f543..b35233649d 100644
--- a/spec/unit/resource/cookbook_file_spec.rb
+++ b/spec/unit/resource/cookbook_file_spec.rb
@@ -2,7 +2,7 @@
# Author:: Daniel DeLeo (<dan@chef.io>)
# Author:: Tyler Cloke (<tyler@chef.io>)
# Copyright:: Copyright 2010-2017, Chef Software Inc.
-#p License:: Apache License, Version 2.0
+# p License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/spec/unit/resource/powershell_package_spec.rb b/spec/unit/resource/powershell_package_spec.rb
index 33c652f1d7..d82121a97b 100644
--- a/spec/unit/resource/powershell_package_spec.rb
+++ b/spec/unit/resource/powershell_package_spec.rb
@@ -26,7 +26,7 @@ describe Chef::Resource::PowershellPackage do
expect(resource).to be_a_kind_of(Chef::Resource::Package)
end
- #to check the value of resource.resource_name
+ # to check the value of resource.resource_name
it "has a resource name of :powershell_package" do
expect(resource.resource_name).to eql(:powershell_package)
end
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index 92429e3257..a4f64e11e1 100644
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -675,7 +675,7 @@ describe Chef::Resource do
snitch_variable = nil
resource.only_if { snitch_variable = true }
expect(resource.only_if.first.positivity).to eq(:only_if)
- #Chef::Mixin::Command.should_receive(:only_if).with(true, {}).and_return(false)
+ # Chef::Mixin::Command.should_receive(:only_if).with(true, {}).and_return(false)
resource.run_action(:purr)
expect(snitch_variable).to be_truthy
end
diff --git a/spec/unit/role_spec.rb b/spec/unit/role_spec.rb
index b1400ae4f3..8e73ad347d 100644
--- a/spec/unit/role_spec.rb
+++ b/spec/unit/role_spec.rb
@@ -189,8 +189,8 @@ describe Chef::Role do
end
it "should include 'run_list'" do
- #Activesupport messes with Chef json formatting
- #This test should pass with and without activesupport
+ # Activesupport messes with Chef json formatting
+ # This test should pass with and without activesupport
expect(@serialized_role).to match(/"run_list":\["recipe\[one\]","recipe\[two\]","role\[a\]"\]/)
end
@@ -201,8 +201,8 @@ describe Chef::Role do
end
it "includes the per-environment run lists" do
- #Activesupport messes with Chef json formatting
- #This test should pass with and without activesupport
+ # Activesupport messes with Chef json formatting
+ # This test should pass with and without activesupport
expect(@serialized_role["env_run_lists"]["production"]).to eq(["role[monitoring]", "role[auditing]", "role[apache]"])
expect(@serialized_role["env_run_lists"]["dev"]).to eq(["role[nginx]"])
end
diff --git a/spec/unit/run_list_spec.rb b/spec/unit/run_list_spec.rb
index 6117a89ca7..ac062c665d 100644
--- a/spec/unit/run_list_spec.rb
+++ b/spec/unit/run_list_spec.rb
@@ -197,7 +197,7 @@ describe Chef::RunList do
describe "from the chef server" do
it "should load the role from the chef server" do
- #@rest.should_receive(:get).with("roles/stubby")
+ # @rest.should_receive(:get).with("roles/stubby")
expansion = @run_list.expand("_default", "server")
expect(expansion.recipes).to eq(%w{one two kitty})
end
diff --git a/spec/unit/shell/shell_session_spec.rb b/spec/unit/shell/shell_session_spec.rb
index c4cb7c6815..ce66676196 100644
--- a/spec/unit/shell/shell_session_spec.rb
+++ b/spec/unit/shell/shell_session_spec.rb
@@ -214,7 +214,7 @@ describe Shell::SoloLegacySession do
it "keeps json attribs and passes them to the node for consumption" do
@session.node_attributes = { "besnard_lakes" => "are_the_dark_horse" }
expect(@session.node["besnard_lakes"]).to eq("are_the_dark_horse")
- #pending "1) keep attribs in an ivar 2) pass them to the node 3) feed them to the node on reset"
+ # pending "1) keep attribs in an ivar 2) pass them to the node 3) feed them to the node on reset"
end
it "generates its resource collection from the compiled cookbooks and the ad hoc recipe" do
@@ -223,7 +223,7 @@ describe Shell::SoloLegacySession do
@run_context.resource_collection << kitteh_cat
keyboard_cat = Chef::Resource::Cat.new("keyboard_cat")
@recipe.run_context.resource_collection << keyboard_cat
- #@session.rebuild_collection
+ # @session.rebuild_collection
expect(@session.resource_collection).to include(kitteh_cat, keyboard_cat)
end
diff --git a/spec/unit/win32/registry_spec.rb b/spec/unit/win32/registry_spec.rb
index c880c8922a..574f38d8e2 100644
--- a/spec/unit/win32/registry_spec.rb
+++ b/spec/unit/win32/registry_spec.rb
@@ -41,7 +41,7 @@ describe Chef::Win32::Registry do
before(:each) do
allow_any_instance_of(Chef::Win32::Registry).to receive(:machine_architecture).and_return(:x86_64)
- #Making the values for registry constants available on unix
+ # Making the values for registry constants available on unix
Win32::Registry::KEY_SET_VALUE = 0x0002
Win32::Registry::KEY_QUERY_VALUE = 0x0001
Win32::Registry::KEY_WRITE = 0x00020000 | 0x0002 | 0x0004