From 0e4ae653c0628cb0df9ccace98bca4bc7478fb7c Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 18 Jul 2011 23:40:17 -0700 Subject: Maint: Fix miscellaneous tests Several tests were broken due to pecularities of Windows and Ruby on Windows: * Ruby on windows does not differentiate between group and other file permissions. * All open file handles must be closed before the file can be deleted * Sometimes the current working directory (Dir.getwd) is reported as C:/foo and other times as C:\\foo, which confuses the spec tests. * Ruby's sprintf formats floating point values differently on Windows vs Unix. The Windows exponent has an extra leading zero. * Needed to stub execution of security command with the SMF service provider. Reviewed-by: Jacob Helwig --- spec/unit/application/inspect_spec.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'spec/unit/application') diff --git a/spec/unit/application/inspect_spec.rb b/spec/unit/application/inspect_spec.rb index 15a3beeba..9f12c83ad 100755 --- a/spec/unit/application/inspect_spec.rb +++ b/spec/unit/application/inspect_spec.rb @@ -98,6 +98,7 @@ describe Puppet::Application::Inspect do catalog = Puppet::Resource::Catalog.new file = Tempfile.new("foo") resource = Puppet::Resource.new(:file, file.path, :parameters => {:audit => "all"}) + file.close file.delete catalog.add_resource(resource) Puppet::Resource::Catalog::Yaml.any_instance.stubs(:find).returns(catalog) -- cgit