diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-08-12 09:10:30 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-08-12 14:01:48 -0700 |
commit | a62719b1ab6ea90a6c308daaca11e9b253cc69fb (patch) | |
tree | 53889460de81c80ccc5ee324efc4444aea3817dc /spec/support/platform_helpers.rb | |
parent | 798cac61accc035b51aaac25160bf1d5e9715252 (diff) | |
download | chef-minor_spec.tar.gz |
Minor tweaks to the platform checks in the specsminor_spec
Use match? to make sure we always get a bool back. Rename os_x? to
macos?
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/support/platform_helpers.rb')
-rw-r--r-- | spec/support/platform_helpers.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb index 7e17b75206..05839d40ea 100644 --- a/spec/support/platform_helpers.rb +++ b/spec/support/platform_helpers.rb @@ -134,19 +134,19 @@ def unix? end def linux? - !!(RUBY_PLATFORM =~ /linux/) + RUBY_PLATFORM.match?(/linux/) end -def os_x? - !!(RUBY_PLATFORM =~ /darwin/) +def macos? + RUBY_PLATFORM.match?(/darwin/) end def solaris? - !!(RUBY_PLATFORM =~ /solaris/) + RUBY_PLATFORM.match?(/solaris/) end def freebsd? - !!(RUBY_PLATFORM =~ /freebsd/) + RUBY_PLATFORM.match?(/freebsd/) end def intel_64bit? @@ -182,7 +182,7 @@ def debian_family? end def aix? - !!(RUBY_PLATFORM =~ /aix/) + RUBY_PLATFORM.match?(/aix/) end def wpar? |