diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-17 12:15:26 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-17 13:25:02 -0700 |
commit | a0c32511bc6634538374ca4b433032b8acd05f96 (patch) | |
tree | 15c7cfbd0d773488ab814e7c24f0c58505c9134b /spec/functional/win32 | |
parent | 3d0379a2ad531a0b3db5ed2827bf30ef07b26100 (diff) | |
download | chef-a0c32511bc6634538374ca4b433032b8acd05f96.tar.gz |
fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgrade
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/functional/win32')
-rw-r--r-- | spec/functional/win32/crypto_spec.rb | 2 | ||||
-rw-r--r-- | spec/functional/win32/security_spec.rb | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/spec/functional/win32/crypto_spec.rb b/spec/functional/win32/crypto_spec.rb index 75a8bfbd24..145c9881b9 100644 --- a/spec/functional/win32/crypto_spec.rb +++ b/spec/functional/win32/crypto_spec.rb @@ -22,7 +22,7 @@ if Chef::Platform.windows? end describe "Chef::ReservedNames::Win32::Crypto", :windows_only do - describe '#encrypt' do + describe "#encrypt" do before(:all) do new_node = Chef::Node.new new_node.consume_external_attrs(OHAI_SYSTEM.data, {}) diff --git a/spec/functional/win32/security_spec.rb b/spec/functional/win32/security_spec.rb index c4951f375c..40ae99bfa4 100644 --- a/spec/functional/win32/security_spec.rb +++ b/spec/functional/win32/security_spec.rb @@ -45,27 +45,27 @@ describe "Chef::Win32::Security", :windows_only do end describe "access_check" do - let(:security_descriptor) { + let(:security_descriptor) do Chef::ReservedNames::Win32::Security.get_file_security( "C:\\Program Files") - } + end let(:token_rights) { Chef::ReservedNames::Win32::Security::TOKEN_ALL_ACCESS } - let(:token) { + let(:token) do Chef::ReservedNames::Win32::Security.open_process_token( Chef::ReservedNames::Win32::Process.get_current_process, token_rights).duplicate_token(:SecurityImpersonation) - } + end - let(:mapping) { + let(:mapping) do mapping = Chef::ReservedNames::Win32::Security::GENERIC_MAPPING.new mapping[:GenericRead] = Chef::ReservedNames::Win32::Security::FILE_GENERIC_READ mapping[:GenericWrite] = Chef::ReservedNames::Win32::Security::FILE_GENERIC_WRITE mapping[:GenericExecute] = Chef::ReservedNames::Win32::Security::FILE_GENERIC_EXECUTE mapping[:GenericAll] = Chef::ReservedNames::Win32::Security::FILE_ALL_ACCESS mapping - } + end let(:desired_access) { Chef::ReservedNames::Win32::Security::FILE_GENERIC_READ } @@ -76,11 +76,11 @@ describe "Chef::Win32::Security", :windows_only do end describe "Chef::Win32::Security::Token" do - let(:token) { + let(:token) do Chef::ReservedNames::Win32::Security.open_process_token( Chef::ReservedNames::Win32::Process.get_current_process, token_rights) - } + end context "with all rights" do let(:token_rights) { Chef::ReservedNames::Win32::Security::TOKEN_ALL_ACCESS } |