diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:25:16 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:25:16 -0700 |
commit | 35603c7ce1bd3ccf35334ed65152140f0ecaf080 (patch) | |
tree | 452c84ce196ce00d672c71a8fa65f86c5a074fac /spec/spec_helper.rb | |
parent | eda2808dce8146bfdb308dd658b1dd565df3562b (diff) | |
download | chef-35603c7ce1bd3ccf35334ed65152140f0ecaf080.tar.gz |
fix Style/HashSyntax
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b4d337eecd..c9ba059ddb 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -119,8 +119,8 @@ resource_handler_map ||= nil RSpec.configure do |config| config.include(Matchers) config.include(MockShellout::RSpec) - config.filter_run :focus => true - config.filter_run_excluding :external => true + config.filter_run focus: true + config.filter_run_excluding external: true # Explicitly disable :should syntax config.expect_with :rspec do |c| @@ -134,83 +134,83 @@ RSpec.configure do |config| config.filter_run_excluding :workstation if solaris? || aix? # Tests that randomly fail, but may have value. - config.filter_run_excluding :volatile => true - config.filter_run_excluding :volatile_on_solaris => true if solaris? - config.filter_run_excluding :volatile_from_verify => false - - config.filter_run_excluding :skip_appveyor => true if ENV["APPVEYOR"] - config.filter_run_excluding :appveyor_only => true unless ENV["APPVEYOR"] - config.filter_run_excluding :skip_travis => true if ENV["TRAVIS"] - - config.filter_run_excluding :windows_only => true unless windows? - config.filter_run_excluding :not_supported_on_mac_osx_106 => true if mac_osx_106? - config.filter_run_excluding :not_supported_on_mac_osx => true if mac_osx? - config.filter_run_excluding :mac_osx_only => true if !mac_osx? - config.filter_run_excluding :not_supported_on_aix => true if aix? - config.filter_run_excluding :not_supported_on_solaris => true if solaris? - config.filter_run_excluding :not_supported_on_gce => true if gce? - config.filter_run_excluding :not_supported_on_nano => true if windows_nano_server? - config.filter_run_excluding :win2012r2_only => true unless windows_2012r2? - config.filter_run_excluding :windows_2008r2_or_later => true unless windows_2008r2_or_later? - config.filter_run_excluding :windows64_only => true unless windows64? - config.filter_run_excluding :windows32_only => true unless windows32? - config.filter_run_excluding :windows_nano_only => true unless windows_nano_server? - config.filter_run_excluding :windows_gte_10 => true unless windows_gte_10? - config.filter_run_excluding :windows_lt_10 => true if windows_gte_10? - config.filter_run_excluding :ruby64_only => true unless ruby_64bit? - config.filter_run_excluding :ruby32_only => true unless ruby_32bit? - config.filter_run_excluding :windows_powershell_dsc_only => true unless windows_powershell_dsc? - config.filter_run_excluding :windows_powershell_no_dsc_only => true unless ! windows_powershell_dsc? - config.filter_run_excluding :windows_domain_joined_only => true unless windows_domain_joined? - config.filter_run_excluding :windows_not_domain_joined_only => true if windows_domain_joined? + config.filter_run_excluding volatile: true + config.filter_run_excluding volatile_on_solaris: true if solaris? + config.filter_run_excluding volatile_from_verify: false + + config.filter_run_excluding skip_appveyor: true if ENV["APPVEYOR"] + config.filter_run_excluding appveyor_only: true unless ENV["APPVEYOR"] + config.filter_run_excluding skip_travis: true if ENV["TRAVIS"] + + config.filter_run_excluding windows_only: true unless windows? + config.filter_run_excluding not_supported_on_mac_osx_106: true if mac_osx_106? + config.filter_run_excluding not_supported_on_mac_osx: true if mac_osx? + config.filter_run_excluding mac_osx_only: true if !mac_osx? + config.filter_run_excluding not_supported_on_aix: true if aix? + config.filter_run_excluding not_supported_on_solaris: true if solaris? + config.filter_run_excluding not_supported_on_gce: true if gce? + config.filter_run_excluding not_supported_on_nano: true if windows_nano_server? + config.filter_run_excluding win2012r2_only: true unless windows_2012r2? + config.filter_run_excluding windows_2008r2_or_later: true unless windows_2008r2_or_later? + config.filter_run_excluding windows64_only: true unless windows64? + config.filter_run_excluding windows32_only: true unless windows32? + config.filter_run_excluding windows_nano_only: true unless windows_nano_server? + config.filter_run_excluding windows_gte_10: true unless windows_gte_10? + config.filter_run_excluding windows_lt_10: true if windows_gte_10? + config.filter_run_excluding ruby64_only: true unless ruby_64bit? + config.filter_run_excluding ruby32_only: true unless ruby_32bit? + config.filter_run_excluding windows_powershell_dsc_only: true unless windows_powershell_dsc? + config.filter_run_excluding windows_powershell_no_dsc_only: true unless ! windows_powershell_dsc? + config.filter_run_excluding windows_domain_joined_only: true unless windows_domain_joined? + config.filter_run_excluding windows_not_domain_joined_only: true if windows_domain_joined? # We think this line was causing rspec tests to not run on the Jenkins windows # testers. If we ever fix it we should restore it. # config.filter_run_excluding :windows_service_requires_assign_token => true if !STDOUT.isatty && !windows_user_right?("SeAssignPrimaryTokenPrivilege") - config.filter_run_excluding :windows_service_requires_assign_token => true - config.filter_run_excluding :solaris_only => true unless solaris? - config.filter_run_excluding :system_windows_service_gem_only => true unless system_windows_service_gem? - config.filter_run_excluding :unix_only => true unless unix? - config.filter_run_excluding :linux_only => true unless linux? - config.filter_run_excluding :aix_only => true unless aix? - config.filter_run_excluding :debian_family_only => true unless debian_family? - config.filter_run_excluding :supports_cloexec => true unless supports_cloexec? - config.filter_run_excluding :selinux_only => true unless selinux_enabled? - config.filter_run_excluding :requires_root => true unless root? - config.filter_run_excluding :requires_root_or_running_windows => true unless root? || windows? - config.filter_run_excluding :requires_unprivileged_user => true if root? - config.filter_run_excluding :uses_diff => true unless has_diff? - config.filter_run_excluding :openssl_gte_101 => true unless openssl_gte_101? - config.filter_run_excluding :openssl_lt_101 => true unless openssl_lt_101? - config.filter_run_excluding :aes_256_gcm_only => true unless aes_256_gcm? - config.filter_run_excluding :broken => true - config.filter_run_excluding :not_wpar => true unless wpar? - config.filter_run_excluding :not_supported_under_fips => true if fips? - config.filter_run_excluding :rhel => true unless rhel? - config.filter_run_excluding :rhel5 => true unless rhel5? - config.filter_run_excluding :rhel6 => true unless rhel6? - config.filter_run_excluding :rhel7 => true unless rhel7? - config.filter_run_excluding :intel_64bit => true unless intel_64bit? - config.filter_run_excluding :not_rhel => true if rhel? - config.filter_run_excluding :not_rhel5 => true if rhel5? - config.filter_run_excluding :not_rhel6 => true if rhel6? - config.filter_run_excluding :not_rhel7 => true if rhel7? - config.filter_run_excluding :not_intel_64bit => true if intel_64bit? + config.filter_run_excluding windows_service_requires_assign_token: true + config.filter_run_excluding solaris_only: true unless solaris? + config.filter_run_excluding system_windows_service_gem_only: true unless system_windows_service_gem? + config.filter_run_excluding unix_only: true unless unix? + config.filter_run_excluding linux_only: true unless linux? + config.filter_run_excluding aix_only: true unless aix? + config.filter_run_excluding debian_family_only: true unless debian_family? + config.filter_run_excluding supports_cloexec: true unless supports_cloexec? + config.filter_run_excluding selinux_only: true unless selinux_enabled? + config.filter_run_excluding requires_root: true unless root? + config.filter_run_excluding requires_root_or_running_windows: true unless root? || windows? + config.filter_run_excluding requires_unprivileged_user: true if root? + config.filter_run_excluding uses_diff: true unless has_diff? + config.filter_run_excluding openssl_gte_101: true unless openssl_gte_101? + config.filter_run_excluding openssl_lt_101: true unless openssl_lt_101? + config.filter_run_excluding aes_256_gcm_only: true unless aes_256_gcm? + config.filter_run_excluding broken: true + config.filter_run_excluding not_wpar: true unless wpar? + config.filter_run_excluding not_supported_under_fips: true if fips? + config.filter_run_excluding rhel: true unless rhel? + config.filter_run_excluding rhel5: true unless rhel5? + config.filter_run_excluding rhel6: true unless rhel6? + config.filter_run_excluding rhel7: true unless rhel7? + config.filter_run_excluding intel_64bit: true unless intel_64bit? + config.filter_run_excluding not_rhel: true if rhel? + config.filter_run_excluding not_rhel5: true if rhel5? + config.filter_run_excluding not_rhel6: true if rhel6? + config.filter_run_excluding not_rhel7: true if rhel7? + config.filter_run_excluding not_intel_64bit: true if intel_64bit? # these let us use chef: ">= 13" or ruby: "~> 2.0.0" or any other Gem::Dependency-style constraint config.filter_run_excluding chef: DependencyProc.with(Chef::VERSION) config.filter_run_excluding ruby: DependencyProc.with(RUBY_VERSION) - config.filter_run_excluding :choco_installed => true unless choco_installed? + config.filter_run_excluding choco_installed: true unless choco_installed? running_platform_arch = `uname -m`.strip unless windows? - config.filter_run_excluding :arch => lambda { |target_arch| + config.filter_run_excluding arch: lambda { |target_arch| running_platform_arch != target_arch } # Functional Resource tests that are provider-specific: # context "on platforms that use useradd", :provider => {:user => Chef::Provider::User::Useradd}} do #... - config.filter_run_excluding :provider => lambda { |criteria| + config.filter_run_excluding provider: lambda { |criteria| type, target_provider = criteria.first node = TEST_NODE.dup |