summaryrefslogtreecommitdiff
path: root/spec/unit/resource/windows_path_spec.rb
diff options
context:
space:
mode:
authornimisha <nimisha.sharad@clogeny.com>2017-07-31 18:42:50 +0530
committernimisha <nimisha.sharad@clogeny.com>2017-08-16 14:49:02 +0530
commit68a3098e04b6f9a79ded4b555d81ae9fbac6c176 (patch)
treea12cc04e6d78b92ed7309e08135fb4cdb4d94979 /spec/unit/resource/windows_path_spec.rb
parentb8c447a3f7e821773dfec4bc443e344c05d906a0 (diff)
downloadchef-68a3098e04b6f9a79ded4b555d81ae9fbac6c176.tar.gz
Fixed specs
Signed-off-by: nimisha <nimisha.sharad@clogeny.com>
Diffstat (limited to 'spec/unit/resource/windows_path_spec.rb')
-rw-r--r--spec/unit/resource/windows_path_spec.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/spec/unit/resource/windows_path_spec.rb b/spec/unit/resource/windows_path_spec.rb
new file mode 100644
index 0000000000..aecea8ee6b
--- /dev/null
+++ b/spec/unit/resource/windows_path_spec.rb
@@ -0,0 +1,38 @@
+#
+# Author:: Nimisha Sharad (<nimisha.sharad@msystechnologies.com>)
+# Copyright:: Copyright 2008-2017, Chef Software, Inc.
+# 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.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+require "spec_helper"
+
+describe Chef::Resource::WindowsPath do
+ subject { Chef::Resource::WindowsPath.new("some_path") }
+
+ it { is_expected.to be_a_kind_of(Chef::Resource) }
+ it { is_expected.to be_a_instance_of(Chef::Resource::WindowsPath) }
+
+ it "sets resource name as :windows_path" do
+ expect(subject.resource_name).to eql(:windows_path)
+ end
+
+ it "sets the path as it's name" do
+ expect(subject.path).to eql("some_path")
+ end
+
+ it "sets the default action as :add" do
+ expect(subject.action).to eql(:add)
+ end
+end