diff options
Diffstat (limited to 'spec/support/shared')
4 files changed, 7 insertions, 13 deletions
diff --git a/spec/support/shared/functional/securable_resource.rb b/spec/support/shared/functional/securable_resource.rb index 506b96736c..95f4f4bd49 100644 --- a/spec/support/shared/functional/securable_resource.rb +++ b/spec/support/shared/functional/securable_resource.rb @@ -81,7 +81,7 @@ shared_context "use Windows permissions", :windows_only do SID ||= Chef::ReservedNames::Win32::Security::SID ACE ||= Chef::ReservedNames::Win32::Security::ACE ACL ||= Chef::ReservedNames::Win32::Security::ACL - SecurableObject ||= Chef::ReservedNames::Win32::Security::SecurableObject + SecurableObject ||= Chef::ReservedNames::Win32::Security::SecurableObject # rubocop:disable Style/ConstantName end def get_security_descriptor(path) @@ -138,9 +138,9 @@ shared_context "use Windows permissions", :windows_only do RSpec::Matchers.define :have_expected_properties do |mask, type, flags| match do |ace| - ace.mask == mask - ace.type == type - ace.flags == flags + ace.mask == mask && + ace.type == type && + ace.flags == flags end end @@ -439,7 +439,7 @@ shared_examples_for "a securable resource without existing target" do context "with a mode attribute" do if windows? - Security ||= Chef::ReservedNames::Win32::API::Security + Security ||= Chef::ReservedNames::Win32::API::Security # rubocop:disable Style/ConstantName end it "respects mode in string form as an octal number" do diff --git a/spec/support/shared/functional/win32_service.rb b/spec/support/shared/functional/win32_service.rb index 0f9072bdef..f9cc43d3f9 100644 --- a/spec/support/shared/functional/win32_service.rb +++ b/spec/support/shared/functional/win32_service.rb @@ -23,9 +23,7 @@ shared_context "using Win32::Service" do # We can only uninstall when the service is stopped. if test_service_state != "stopped" ::Win32::Service.send("stop", "spec-service") - while test_service_state != "stopped" - sleep 1 - end + sleep 1 while test_service_state != "stopped" end ::Win32::Service.delete("spec-service") diff --git a/spec/support/shared/integration/app_server_support.rb b/spec/support/shared/integration/app_server_support.rb index 9bc48dbd93..4dfa3fa155 100644 --- a/spec/support/shared/integration/app_server_support.rb +++ b/spec/support/shared/integration/app_server_support.rb @@ -33,9 +33,7 @@ module AppServerSupport end end Timeout.timeout(30) do - until server && server.status == :Running - sleep(0.01) - end + sleep(0.01) until server && server.status == :Running end [server, thread] end diff --git a/spec/support/shared/integration/knife_support.rb b/spec/support/shared/integration/knife_support.rb index 01df9ab1a7..1a374e1b84 100644 --- a/spec/support/shared/integration/knife_support.rb +++ b/spec/support/shared/integration/knife_support.rb @@ -111,8 +111,6 @@ module KnifeSupport end end - private - class KnifeResult include ::RSpec::Matchers |