summaryrefslogtreecommitdiff
path: root/spec/unit/file_content_management/deploy/mv_windows_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/file_content_management/deploy/mv_windows_spec.rb')
-rw-r--r--spec/unit/file_content_management/deploy/mv_windows_spec.rb52
1 files changed, 26 insertions, 26 deletions
diff --git a/spec/unit/file_content_management/deploy/mv_windows_spec.rb b/spec/unit/file_content_management/deploy/mv_windows_spec.rb
index 30a62c4da9..80155f131c 100644
--- a/spec/unit/file_content_management/deploy/mv_windows_spec.rb
+++ b/spec/unit/file_content_management/deploy/mv_windows_spec.rb
@@ -59,10 +59,10 @@ describe Chef::FileContentManagement::Deploy::MvWindows do
end
before do
- allow(Chef::ReservedNames::Win32::Security::SecurableObject).
- to receive(:new).
- with(target_file_path).
- and_return(target_file_security_object, updated_target_security_object)
+ allow(Chef::ReservedNames::Win32::Security::SecurableObject)
+ .to receive(:new)
+ .with(target_file_path)
+ .and_return(target_file_security_object, updated_target_security_object)
end
@@ -84,8 +84,8 @@ describe Chef::FileContentManagement::Deploy::MvWindows do
let(:target_file_security_descriptor) do
double "security descriptor for target file",
- :group => original_target_file_group,
- :owner => original_target_file_owner
+ group: original_target_file_group,
+ owner: original_target_file_owner
end
let(:updated_target_security_descriptor) do
@@ -147,19 +147,19 @@ describe Chef::FileContentManagement::Deploy::MvWindows do
allow(target_file_security_descriptor).to receive(:dacl_inherits?).and_return(false)
allow(target_file_security_descriptor).to receive(:dacl).and_return(original_target_file_dacl)
- expect(Chef::ReservedNames::Win32::Security::ACL).
- to receive(:create).
- with([]).
- and_return(empty_dacl)
+ expect(Chef::ReservedNames::Win32::Security::ACL)
+ .to receive(:create)
+ .with([])
+ .and_return(empty_dacl)
allow(target_file_security_descriptor).to receive(:sacl_present?).and_return(true)
allow(target_file_security_descriptor).to receive(:sacl_inherits?).and_return(false)
allow(target_file_security_descriptor).to receive(:sacl).and_return(original_target_file_sacl)
- expect(Chef::ReservedNames::Win32::Security::ACL).
- to receive(:create).
- with([]).
- and_return(empty_sacl)
+ expect(Chef::ReservedNames::Win32::Security::ACL)
+ .to receive(:create)
+ .with([])
+ .and_return(empty_sacl)
expect(updated_target_security_object).to receive(:set_dacl).with(empty_dacl, false)
expect(updated_target_security_object).to receive(:set_sacl).with(empty_sacl, false)
@@ -171,13 +171,13 @@ describe Chef::FileContentManagement::Deploy::MvWindows do
end
context "and the target has a dacl and sacl" do
- let(:inherited_dacl_ace) { double("Windows dacl ace (inherited)", :inherited? => true) }
- let(:not_inherited_dacl_ace) { double("Windows dacl ace (not inherited)", :inherited? => false) }
+ let(:inherited_dacl_ace) { double("Windows dacl ace (inherited)", inherited?: true) }
+ let(:not_inherited_dacl_ace) { double("Windows dacl ace (not inherited)", inherited?: false) }
let(:original_target_file_dacl) { [inherited_dacl_ace, not_inherited_dacl_ace] }
- let(:inherited_sacl_ace) { double("Windows sacl ace (inherited)", :inherited? => true) }
- let(:not_inherited_sacl_ace) { double("Windows sacl ace (not inherited)", :inherited? => false) }
+ let(:inherited_sacl_ace) { double("Windows sacl ace (inherited)", inherited?: true) }
+ let(:not_inherited_sacl_ace) { double("Windows sacl ace (not inherited)", inherited?: false) }
let(:original_target_file_sacl) { [inherited_sacl_ace, not_inherited_sacl_ace] }
let(:custom_dacl) { double("Windows ACL for non-inherited dacl aces") }
@@ -188,19 +188,19 @@ describe Chef::FileContentManagement::Deploy::MvWindows do
allow(target_file_security_descriptor).to receive(:dacl_inherits?).and_return(dacl_inherits?)
allow(target_file_security_descriptor).to receive(:dacl).and_return(original_target_file_dacl)
- expect(Chef::ReservedNames::Win32::Security::ACL).
- to receive(:create).
- with([not_inherited_dacl_ace]).
- and_return(custom_dacl)
+ expect(Chef::ReservedNames::Win32::Security::ACL)
+ .to receive(:create)
+ .with([not_inherited_dacl_ace])
+ .and_return(custom_dacl)
allow(target_file_security_descriptor).to receive(:sacl_present?).and_return(true)
allow(target_file_security_descriptor).to receive(:sacl_inherits?).and_return(sacl_inherits?)
allow(target_file_security_descriptor).to receive(:sacl).and_return(original_target_file_sacl)
- expect(Chef::ReservedNames::Win32::Security::ACL).
- to receive(:create).
- with([not_inherited_sacl_ace]).
- and_return(custom_sacl)
+ expect(Chef::ReservedNames::Win32::Security::ACL)
+ .to receive(:create)
+ .with([not_inherited_sacl_ace])
+ .and_return(custom_sacl)
expect(updated_target_security_object).to receive(:set_dacl).with(custom_dacl, dacl_inherits?)
expect(updated_target_security_object).to receive(:set_sacl).with(custom_sacl, sacl_inherits?)