summaryrefslogtreecommitdiff
path: root/spec/unit/resource/sysctl_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/resource/sysctl_spec.rb')
-rw-r--r--spec/unit/resource/sysctl_spec.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/unit/resource/sysctl_spec.rb b/spec/unit/resource/sysctl_spec.rb
index 934db9b9e2..da3ae2f334 100644
--- a/spec/unit/resource/sysctl_spec.rb
+++ b/spec/unit/resource/sysctl_spec.rb
@@ -24,12 +24,17 @@ describe Chef::Resource::Sysctl do
expect(resource.resource_name).to eql(:sysctl)
end
+ it "the key property is the name_property" do
+ expect(resource.key).to eql("something.something")
+ end
+
it "sets the default action as :apply" do
expect(resource.action).to eql([:apply])
end
- it "sets the key property as its name property" do
- expect(resource.key).to eql("something.something")
+ it "supports :apply, :remove actions" do
+ expect { resource.action :apply }.not_to raise_error
+ expect { resource.action :remove }.not_to raise_error
end
it "coerces Arrays in the value property to space delimited Strings" do
@@ -46,11 +51,4 @@ describe Chef::Resource::Sysctl do
resource.value 1.1
expect(resource.value).to eql("1.1")
end
-
- it "supports :apply and :remove actions" do
- expect { resource.action :apply }.not_to raise_error
- expect { resource.action :remove }.not_to raise_error
- expect { resource.action :delete }.to raise_error(ArgumentError)
- expect { resource.action :install }.to raise_error(ArgumentError)
- end
end