summaryrefslogtreecommitdiff
path: root/spec/unit/lwrp_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/lwrp_spec.rb')
-rw-r--r--spec/unit/lwrp_spec.rb14
1 files changed, 3 insertions, 11 deletions
diff --git a/spec/unit/lwrp_spec.rb b/spec/unit/lwrp_spec.rb
index e18ab135a5..5a3b71db33 100644
--- a/spec/unit/lwrp_spec.rb
+++ b/spec/unit/lwrp_spec.rb
@@ -119,7 +119,6 @@ describe "LWRP" do
# The test is that this should not raise an error:
Chef::Resource::LWRPBase.build_from_file("lwrp_const_scoping", conflicting_lwrp_file, nil)
end
-
end
context "When an LWRP resource in cookbook l-w-r-p is loaded" do
@@ -170,7 +169,6 @@ describe "LWRP" do
end
describe "Lightweight Chef::Resource" do
-
before do
Dir[File.expand_path(File.join(File.dirname(__FILE__), "..", "data", "lwrp", "resources", "*"))].each do |file|
Chef::Resource::LWRPBase.build_from_file("lwrp", file, nil)
@@ -202,7 +200,7 @@ describe "LWRP" do
end
it "should create a method for each attribute" do
- expect(get_lwrp(:lwrp_foo).new("blah").methods.map{ |m| m.to_sym}).to include(:monkey)
+ expect(get_lwrp(:lwrp_foo).new("blah").methods.map { |m| m.to_sym }).to include(:monkey)
end
it "should build attribute methods that respect validation rules" do
@@ -246,8 +244,8 @@ describe "LWRP" do
let(:klass) do
Class.new(Chef::Resource::LWRPBase) do
self.resource_name = :sample_resource
- attribute :food, :default => lazy { "BACON!"*3 }
- attribute :drink, :default => lazy { |r| "Drink after #{r.food}!"}
+ attribute :food, :default => lazy { "BACON!" * 3 }
+ attribute :drink, :default => lazy { |r| "Drink after #{r.food}!" }
end
end
@@ -379,7 +377,6 @@ describe "LWRP" do
end
describe "Lightweight Chef::Provider" do
-
let(:node) do
Chef::Node.new.tap do |n|
n.automatic[:platform] = :ubuntu
@@ -447,7 +444,6 @@ describe "LWRP" do
end
context "with a cookbook with an underscore in the name" do
-
let(:lwrp_cookbok_name) { "l_w_r_p" }
it "sets itself as a provider for a resource of the same name" do
@@ -458,7 +454,6 @@ describe "LWRP" do
end
context "with a cookbook with a hypen in the name" do
-
let(:lwrp_cookbok_name) { "l-w-r-p" }
it "sets itself as a provider for a resource of the same name" do
@@ -577,7 +572,6 @@ describe "LWRP" do
expect(@resource).not_to be_updated_by_last_action
end
end
-
end
end
@@ -718,5 +712,3 @@ describe "LWRP" do
end
end
end
-
-