summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-01-12 08:06:02 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-01-12 08:06:02 -0800
commitd68bd578761780618e73ce1443788c463d73fe67 (patch)
tree4867db762be1873e8a50e787b1bbd46e58a180b7 /spec/unit
parent0944320b72ee1ab16a18a149f5ecb743ace0c0d3 (diff)
downloadchef-d68bd578761780618e73ce1443788c463d73fe67.tar.gz
fix some lint cops
fixes the following offenses: 46 Lint/EndAlignment 21 Lint/BlockAlignment 3 Lint/SpaceBeforeFirstArg 1 Lint/DefEndAlignment
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/cookbook/metadata_spec.rb4
-rw-r--r--spec/unit/cookbook_loader_spec.rb2
-rw-r--r--spec/unit/encrypted_data_bag_item_spec.rb2
-rw-r--r--spec/unit/mixin/command_spec.rb2
-rw-r--r--spec/unit/provider/group/pw_spec.rb2
-rw-r--r--spec/unit/provider/ifconfig_spec.rb2
-rw-r--r--spec/unit/provider/mdadm_spec.rb2
-rw-r--r--spec/unit/provider/mount/mount_spec.rb2
-rw-r--r--spec/unit/provider/package/yum_spec.rb2
-rw-r--r--spec/unit/provider/service/gentoo_service_spec.rb2
-rw-r--r--spec/unit/provider/service/openbsd_service_spec.rb2
-rw-r--r--spec/unit/resource_reporter_spec.rb2
-rw-r--r--spec/unit/resource_spec.rb4
13 files changed, 15 insertions, 15 deletions
diff --git a/spec/unit/cookbook/metadata_spec.rb b/spec/unit/cookbook/metadata_spec.rb
index f8e96ad475..fbd07f7e69 100644
--- a/spec/unit/cookbook/metadata_spec.rb
+++ b/spec/unit/cookbook/metadata_spec.rb
@@ -582,7 +582,7 @@ describe Chef::Cookbook::Metadata do
expect {
metadata.attribute("db/mysql/databases", :type => "hash")
}.not_to raise_error
- end
+ end
it "should let required be required, recommended or optional" do
expect {
@@ -720,7 +720,7 @@ describe Chef::Cookbook::Metadata do
}
metadata.attribute("db/mysql/databases", attrs)
}.not_to raise_error
- end
+ end
it "should error if default is not a choice" do
expect {
diff --git a/spec/unit/cookbook_loader_spec.rb b/spec/unit/cookbook_loader_spec.rb
index b1384bffe7..7234183a11 100644
--- a/spec/unit/cookbook_loader_spec.rb
+++ b/spec/unit/cookbook_loader_spec.rb
@@ -86,7 +86,7 @@ describe Chef::CookbookLoader do
seen = Array.new
cookbook_loader.each do |cookbook_name, cookbook|
seen << cookbook_name
- end
+ end
expect(seen[0]).to eq("angrybash")
expect(seen[1]).to eq("apache2")
expect(seen[2]).to eq("borken")
diff --git a/spec/unit/encrypted_data_bag_item_spec.rb b/spec/unit/encrypted_data_bag_item_spec.rb
index 0a4306727b..b4d75d2480 100644
--- a/spec/unit/encrypted_data_bag_item_spec.rb
+++ b/spec/unit/encrypted_data_bag_item_spec.rb
@@ -67,7 +67,7 @@ describe Chef::EncryptedDataBagItem::Encryptor do
expect(final_data["encrypted_data"]).to eq encryptor.encrypted_data
expect(final_data["iv"]).to eq Base64.encode64(encryptor.iv)
expect(final_data["version"]).to eq 1
- expect(final_data["cipher"]).to eq"aes-256-cbc"
+ expect(final_data["cipher"]).to eq "aes-256-cbc"
end
end
diff --git a/spec/unit/mixin/command_spec.rb b/spec/unit/mixin/command_spec.rb
index 050b261256..cedabcbe49 100644
--- a/spec/unit/mixin/command_spec.rb
+++ b/spec/unit/mixin/command_spec.rb
@@ -53,7 +53,7 @@ describe Chef::Mixin::Command, :volatile do
popen4("ruby -e 'while gets; end'", :waitlast => true) do |pid, stdin, stdout, stderr|
(1..5).each { |i| stdin.puts "#{i}" }
end
- end
+ end
}.not_to raise_error
end
diff --git a/spec/unit/provider/group/pw_spec.rb b/spec/unit/provider/group/pw_spec.rb
index af74b3b2ce..531d0a52a2 100644
--- a/spec/unit/provider/group/pw_spec.rb
+++ b/spec/unit/provider/group/pw_spec.rb
@@ -119,7 +119,7 @@ describe Chef::Provider::Group::Pw do
end
end
- describe"load_current_resource" do
+ describe "load_current_resource" do
before (:each) do
@provider.action = :create
@provider.load_current_resource
diff --git a/spec/unit/provider/ifconfig_spec.rb b/spec/unit/provider/ifconfig_spec.rb
index 4940f19a45..90109ca1c0 100644
--- a/spec/unit/provider/ifconfig_spec.rb
+++ b/spec/unit/provider/ifconfig_spec.rb
@@ -39,7 +39,7 @@ describe Chef::Provider::Ifconfig do
@provider.instance_variable_set("@status", status)
@provider.current_resource = @current_resource
- end
+ end
describe Chef::Provider::Ifconfig, "load_current_resource" do
before do
@status = double(:stdout => "", :exitstatus => 1)
diff --git a/spec/unit/provider/mdadm_spec.rb b/spec/unit/provider/mdadm_spec.rb
index 77ed5798a8..38401b7225 100644
--- a/spec/unit/provider/mdadm_spec.rb
+++ b/spec/unit/provider/mdadm_spec.rb
@@ -107,7 +107,7 @@ describe Chef::Provider::Mdadm do
expect(@provider).not_to receive(:shell_out!)
@provider.run_action(:assemble)
expect(@new_resource).not_to be_updated_by_last_action
- end
+ end
end
describe "when stopping the metadevice" do
diff --git a/spec/unit/provider/mount/mount_spec.rb b/spec/unit/provider/mount/mount_spec.rb
index dd13a62796..124d51b367 100644
--- a/spec/unit/provider/mount/mount_spec.rb
+++ b/spec/unit/provider/mount/mount_spec.rb
@@ -244,7 +244,7 @@ describe Chef::Provider::Mount::Mount do
@provider.load_current_resource
expect(@provider.current_resource.enabled).to be_falsey
- end
+ end
it "should set enabled to false if the mount point is not last in fstab" do
line_1 = "#{@new_resource.device} #{@new_resource.mount_point} ext3 defaults 1 2\n"
diff --git a/spec/unit/provider/package/yum_spec.rb b/spec/unit/provider/package/yum_spec.rb
index b37a675bf2..41118b70fb 100644
--- a/spec/unit/provider/package/yum_spec.rb
+++ b/spec/unit/provider/package/yum_spec.rb
@@ -261,7 +261,7 @@ describe Chef::Provider::Package::Yum do
allow(@yum_cache).to receive(:installed_version) do |package_name, arch|
# nothing installed for package_name/new_package_name
nil
- end
+ end
allow(@yum_cache).to receive(:candidate_version) do |package_name, arch|
if package_name == "testing.noarch"
nil
diff --git a/spec/unit/provider/service/gentoo_service_spec.rb b/spec/unit/provider/service/gentoo_service_spec.rb
index 0aa7bf4529..b4155f9628 100644
--- a/spec/unit/provider/service/gentoo_service_spec.rb
+++ b/spec/unit/provider/service/gentoo_service_spec.rb
@@ -100,7 +100,7 @@ describe Chef::Provider::Service::Gentoo do
end
end
- end
+ end
it "should return the current_resource" do
expect(@provider.load_current_resource).to eq(@current_resource)
diff --git a/spec/unit/provider/service/openbsd_service_spec.rb b/spec/unit/provider/service/openbsd_service_spec.rb
index d3c150a14b..8118e9b3ee 100644
--- a/spec/unit/provider/service/openbsd_service_spec.rb
+++ b/spec/unit/provider/service/openbsd_service_spec.rb
@@ -250,7 +250,7 @@ describe Chef::Provider::Service::Openbsd do
current_resource.running(false)
allow(provider).to receive(:service_enable_variable_name).and_return "#{new_resource.service_name}_enable"
expect(::File).to receive(:open).with("/etc/rc.d/#{new_resource.service_name}")
- end
+ end
it "should create a current resource with the name of the new resource" do
expect(Chef::Resource::Service).to receive(:new).and_return(current_resource)
diff --git a/spec/unit/resource_reporter_spec.rb b/spec/unit/resource_reporter_spec.rb
index 5b991b5f38..da29cdcc02 100644
--- a/spec/unit/resource_reporter_spec.rb
+++ b/spec/unit/resource_reporter_spec.rb
@@ -207,7 +207,7 @@ describe Chef::ResourceReporter do
@resource_reporter.resource_completed(@implementation_resource)
@resource_reporter.resource_updated(@new_resource, :create)
@resource_reporter.resource_completed(@new_resource)
- end
+ end
it "does not collect data about the nested resource" do
expect(@resource_reporter.updated_resources.size).to eq(1)
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index f4dbc8d745..856ec07b9e 100644
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -1001,14 +1001,14 @@ describe Chef::Resource do
it "when set to false should show compiled resource for failed resource" do
expect { resource_file.run_action(action) }.to raise_error { |err|
expect(compiled_resource_data(resource_file, action, err)).to match 'path "/nonexistent/CHEF-5098/file"'
- }
+ }
end
it "when set to true should show compiled resource for failed resource" do
resource_file.sensitive true
expect { resource_file.run_action(action) }.to raise_error { |err|
expect(compiled_resource_data(resource_file, action, err)).to eql("suppressed sensitive resource output")
- }
+ }
end
end