summaryrefslogtreecommitdiff
path: root/spec/unit/resource/cookbook_file_spec.rb
diff options
context:
space:
mode:
authorSeth Vargo <sethvargo@gmail.com>2013-09-24 17:38:44 -0400
committerBryan McLellan <btm@opscode.com>2013-09-26 11:13:59 -0700
commit6315871ae7deeead95d84d2487c54a03c47e318f (patch)
treea2bf980c434c657aa350c0d3fc4073652cdf43cf /spec/unit/resource/cookbook_file_spec.rb
parent61e98b94fb387353841d5b4575816a1d716cfbc9 (diff)
downloadchef-6315871ae7deeead95d84d2487c54a03c47e318f.tar.gz
Normalize whitespace on all files
Diffstat (limited to 'spec/unit/resource/cookbook_file_spec.rb')
-rw-r--r--spec/unit/resource/cookbook_file_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/unit/resource/cookbook_file_spec.rb b/spec/unit/resource/cookbook_file_spec.rb
index d0408c251a..6c55c8035a 100644
--- a/spec/unit/resource/cookbook_file_spec.rb
+++ b/spec/unit/resource/cookbook_file_spec.rb
@@ -7,9 +7,9 @@
# 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.
@@ -23,29 +23,29 @@ describe Chef::Resource::CookbookFile do
before do
@cookbook_file = Chef::Resource::CookbookFile.new('sourcecode_tarball.tgz')
end
-
+
it "uses the name parameter for the source parameter" do
@cookbook_file.name.should == 'sourcecode_tarball.tgz'
end
-
+
it "has a source parameter" do
@cookbook_file.name('config_file.conf')
@cookbook_file.name.should == 'config_file.conf'
end
-
+
it "defaults to a nil cookbook parameter (current cookbook will be used)" do
@cookbook_file.cookbook.should be_nil
end
-
+
it "has a cookbook parameter" do
@cookbook_file.cookbook("munin")
@cookbook_file.cookbook.should == 'munin'
end
-
+
it "sets the provider to Chef::Provider::CookbookFile" do
@cookbook_file.provider.should == Chef::Provider::CookbookFile
end
-
+
describe "when it has a backup number, group, mode, owner, source, checksum, and cookbook on nix or path, rights, deny_rights, checksum on windows" do
before do
if Chef::Platform.windows?
@@ -63,21 +63,21 @@ describe Chef::Resource::CookbookFile do
@cookbook_file.checksum("1" * 64)
end
-
+
it "describes the state" do
state = @cookbook_file.state
if Chef::Platform.windows?
puts state
state[:rights].should == [{:permissions => :read, :principals => "Everyone"}]
state[:deny_rights].should == [{:permissions => :full_control, :principals => "Clumsy_Sam"}]
- else
+ else
state[:group].should == "wheel"
state[:mode].should == "0664"
state[:owner].should == "root"
end
state[:checksum].should == "1" * 64
end
-
+
it "returns the path as its identity" do
if Chef::Platform.windows?
@cookbook_file.identity.should == "C:/temp/origin/file.txt"