Please review pull request #661: Fix windows spec failures due to absolute_path? changes opened by (pcarlisle)
Description:
In #12101 Puppet::Util.absolute_path? changed to check File::ALT_SEPARATOR instead of Puppet.features.microsoft_windows? in the default case. Some tests that just stubbed features stopped working on Windows. This changes them to use the context helper that accompanied #12101, which implements correct stubbing.
- Opened: Wed Apr 11 23:12:39 UTC 2012
- Based on: puppetlabs:2.7.x (cb505786b6c306d6972aaf24cdd62409fa7a001f)
- Requested merge: pcarlisle:maint/2.7.x/redhat-spec-windows-failure (7d27cd276e01da23e13f500b40c1cc9415907b6e)
Diff follows:
diff --git a/spec/unit/provider/service/redhat_spec.rb b/spec/unit/provider/service/redhat_spec.rb
index aabcf8d..168b0f5 100755
--- a/spec/unit/provider/service/redhat_spec.rb
+++ b/spec/unit/provider/service/redhat_spec.rb
@@ -6,11 +6,9 @@
provider_class = Puppet::Type.type(:service).provider(:redhat)
-describe provider_class do
+describe provider_class, :as_platform => :posix do
before :each do
- Puppet.features.stubs(:posix?).returns(true)
- Puppet.features.stubs(:microsoft_windows?).returns(false)
@class = Puppet::Type.type(:service).provider(:redhat)
@resource = stub 'resource'
@resource.stubs(:[]).returns(nil)
diff --git a/spec/unit/provider/service/smf_spec.rb b/spec/unit/provider/service/smf_spec.rb
index 7527029..2a33ed9 100755
--- a/spec/unit/provider/service/smf_spec.rb
+++ b/spec/unit/provider/service/smf_spec.rb
@@ -8,11 +8,9 @@
provider_class = Puppet::Type.type(:service).provider(:smf)
-describe provider_class do
+describe provider_class, :as_platform => :posix do
before(:each) do
- Puppet.features.stubs(:posix?).returns(true)
- Puppet.features.stubs(:microsoft_windows?).returns(false)
# Create a mock resource
@resource = Puppet::Type.type(:service).new(
:name => "/system/myservice", :ensure => :running, :enable => :true)
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
