summaryrefslogtreecommitdiff
path: root/spec/support/platform_helpers.rb
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2012-12-04 15:11:42 -0800
committersdelano <stephen@opscode.com>2012-12-14 10:23:37 -0800
commitea7aa31fe80858b65124be202e26018706a32a49 (patch)
treee1e17b27011285daf846c48f9d87d92e70cf36a5 /spec/support/platform_helpers.rb
parent2fbdf2b2c3a60f77f4827e672d8b5d0e41b8c766 (diff)
downloadchef-ea7aa31fe80858b65124be202e26018706a32a49.tar.gz
Disable link tests on Windows Server 2003 since symlink is not yet supported on this platform.
Diffstat (limited to 'spec/support/platform_helpers.rb')
-rw-r--r--spec/support/platform_helpers.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index 558817d72a..fcb825319c 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -10,6 +10,14 @@ def windows?
!!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
end
+def windows_win2k3?
+ return false unless windows?
+ require 'ruby-wmi'
+
+ host = WMI::Win32_OperatingSystem.find(:first)
+ (host.version && host.version.start_with?("5.2"))
+end
+
# def jruby?
def unix?