summaryrefslogtreecommitdiff
path: root/spec/functional/win32/versions_spec.rb
diff options
context:
space:
mode:
authoradamedx <adamed@opscode.com>2013-05-04 11:03:06 -0700
committeradamedx <adamed@opscode.com>2013-05-04 11:03:06 -0700
commitbab0da7e13c9337db76010465f58a57fad202f03 (patch)
tree0e44d0489d5ad4060d6cda36e762c27ad92dd32f /spec/functional/win32/versions_spec.rb
parent0c4698de74e895b9c7e9045d1cd83b1963d2d12d (diff)
downloadchef-bab0da7e13c9337db76010465f58a57fad202f03.tar.gz
Add more explanation in test comments on OS idiosyncrasies around OS version information
Diffstat (limited to 'spec/functional/win32/versions_spec.rb')
-rw-r--r--spec/functional/win32/versions_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/functional/win32/versions_spec.rb b/spec/functional/win32/versions_spec.rb
index f6b6d6de7c..a446a1cf21 100644
--- a/spec/functional/win32/versions_spec.rb
+++ b/spec/functional/win32/versions_spec.rb
@@ -32,12 +32,18 @@ describe "Chef::ReservedNames::Win32::Version", :windows_only do
# names for comparison from WMI so the test should not
# need to be modified when new Windows releases arise.
# For Win2k3 and Win2k8, we use static names in this test
- # based on the version number information from WMI.
+ # based on the version number information from WMI. The names
+ # from WMI contain extended characters such as registered
+ # trademark on Win2k8 and Win2k3 that we're not using in our
+ # library, so we have to set the expectation statically.
if Chef::Platform::windows_server_2003?
@current_os_version = 'Windows Server 2003 R2'
elsif is_windows_server_2008?(host)
@current_os_version = 'Windows Server 2008'
else
+ # The name from WMI is actually what we want in Win2k8R2+.
+ # So this expectation sould continue to hold without modification
+ # as new versions of Windows are released.
@current_os_version = host.caption
end