summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-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
42 files changed, 72 insertions, 72 deletions
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