diff options
Diffstat (limited to 'spec/unit/provider/remote_directory_spec.rb')
-rw-r--r-- | spec/unit/provider/remote_directory_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/unit/provider/remote_directory_spec.rb b/spec/unit/provider/remote_directory_spec.rb index e91bd22739..710d6613fc 100644 --- a/spec/unit/provider/remote_directory_spec.rb +++ b/spec/unit/provider/remote_directory_spec.rb @@ -110,7 +110,7 @@ describe Chef::Provider::RemoteDirectory do @resource.path(@destination_dir) end - after {FileUtils.rm_rf(@destination_dir)} + after { FileUtils.rm_rf(@destination_dir) } # CHEF-3552 it "creates the toplevel directory without error " do @@ -134,8 +134,8 @@ describe Chef::Provider::RemoteDirectory do @resource.overwrite(true) @provider.run_action(:create) - File.open(@destination_dir + "/remote_dir_file1.txt", "a") {|f| f.puts "blah blah blah" } - File.open(@destination_dir + "/remotesubdir/remote_subdir_file1.txt", "a") {|f| f.puts "blah blah blah" } + File.open(@destination_dir + "/remote_dir_file1.txt", "a") { |f| f.puts "blah blah blah" } + File.open(@destination_dir + "/remotesubdir/remote_subdir_file1.txt", "a") { |f| f.puts "blah blah blah" } file1md5 = Digest::MD5.hexdigest(File.read(@destination_dir + "/remote_dir_file1.txt")) subdirfile1md5 = Digest::MD5.hexdigest(File.read(@destination_dir + "/remotesubdir/remote_subdir_file1.txt")) @@ -147,7 +147,7 @@ describe Chef::Provider::RemoteDirectory do end describe "with purging enabled" do - before {@resource.purge(true)} + before { @resource.purge(true) } it "removes existing files if purge is true" do @provider.run_action(:create) @@ -202,13 +202,13 @@ describe Chef::Provider::RemoteDirectory do end describe "with overwrite disabled" do - before {@resource.purge(false)} - before {@resource.overwrite(false)} + before { @resource.purge(false) } + before { @resource.overwrite(false) } it "leaves modifications alone" do @provider.run_action(:create) - ::File.open(@destination_dir + "/remote_dir_file1.txt", "a") {|f| f.puts "blah blah blah" } - ::File.open(@destination_dir + "/remotesubdir/remote_subdir_file1.txt", "a") {|f| f.puts "blah blah blah" } + ::File.open(@destination_dir + "/remote_dir_file1.txt", "a") { |f| f.puts "blah blah blah" } + ::File.open(@destination_dir + "/remotesubdir/remote_subdir_file1.txt", "a") { |f| f.puts "blah blah blah" } file1md5 = Digest::MD5.hexdigest(::File.read(@destination_dir + "/remote_dir_file1.txt")) subdirfile1md5 = Digest::MD5.hexdigest(::File.read(@destination_dir + "/remotesubdir/remote_subdir_file1.txt")) @provider.run_action(:create) |