Signed-off-by: Brice Figureau <brice-pup...@daysofwonder.com> --- spec/integration/indirector/direct_file_server.rb | 3 ++- spec/integration/indirector/module_files.rb | 3 ++- spec/integration/type/file.rb | 3 ++- spec/integration/type/tidy.rb | 3 ++- spec/integration/util/settings.rb | 3 ++- spec/shared_behaviours/file_server_terminus.rb | 3 ++- spec/unit/type/file.rb | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/spec/integration/indirector/direct_file_server.rb b/spec/integration/indirector/direct_file_server.rb index c379bcb..1f1ea0d 100755 --- a/spec/integration/indirector/direct_file_server.rb +++ b/spec/integration/indirector/direct_file_server.rb @@ -38,8 +38,9 @@ describe Puppet::Indirector::DirectFileServer, " when interacting with FileServi @terminus = Puppet::Indirector::FileContent::File.new @path = Tempfile.new("direct_file_server_testing") + path = @path.path @path.close! - @path = @path.path + @path = path Dir.mkdir(@path) File.open(File.join(@path, "one"), "w") { |f| f.print "one content" } diff --git a/spec/integration/indirector/module_files.rb b/spec/integration/indirector/module_files.rb index a54588e..a474b75 100755 --- a/spec/integration/indirector/module_files.rb +++ b/spec/integration/indirector/module_files.rb @@ -32,8 +32,9 @@ describe Puppet::Indirector::ModuleFiles, " when interacting with FileServing::F @terminus = Puppet::Indirector::FileContent::Modules.new @path = Tempfile.new("module_file_testing") + path = @path.path @path.close! - @path = @path.path + @path = path Dir.mkdir(@path) Dir.mkdir(File.join(@path, "files")) diff --git a/spec/integration/type/file.rb b/spec/integration/type/file.rb index 8e31bbb..87a478d 100755 --- a/spec/integration/type/file.rb +++ b/spec/integration/type/file.rb @@ -5,8 +5,9 @@ require File.dirname(__FILE__) + '/../../spec_helper' describe Puppet::Type.type(:file) do def tmpfile(name) source = Tempfile.new(name) + path = source.path source.close! - source.path + path end describe "when recursing" do diff --git a/spec/integration/type/tidy.rb b/spec/integration/type/tidy.rb index 5916d88..50ec3d7 100755 --- a/spec/integration/type/tidy.rb +++ b/spec/integration/type/tidy.rb @@ -5,8 +5,9 @@ require File.dirname(__FILE__) + '/../../spec_helper' describe Puppet::Type.type(:tidy) do def tmpfile(name) source = Tempfile.new(name) + path = source.path source.close! - source.path + path end # Testing #355. diff --git a/spec/integration/util/settings.rb b/spec/integration/util/settings.rb index a780464..d2fe868 100755 --- a/spec/integration/util/settings.rb +++ b/spec/integration/util/settings.rb @@ -5,8 +5,9 @@ require File.dirname(__FILE__) + '/../../spec_helper' describe Puppet::Util::Settings do def tmpfile(name) source = Tempfile.new(name) + path = source.path source.close! - source.path + path end it "should be able to make needed directories" do diff --git a/spec/shared_behaviours/file_server_terminus.rb b/spec/shared_behaviours/file_server_terminus.rb index 13561f0..1db6cfa 100644 --- a/spec/shared_behaviours/file_server_terminus.rb +++ b/spec/shared_behaviours/file_server_terminus.rb @@ -12,8 +12,9 @@ describe "Puppet::Indirector::FileServerTerminus", :shared => true do FileTest.stubs(:exists?).with(Puppet[:fileserverconfig]).returns(true) @path = Tempfile.new("file_server_testing") + path = @path.path @path.close! - @path = @path.path + @path = path Dir.mkdir(@path) File.open(File.join(@path, "myfile"), "w") { |f| f.print "my content" } diff --git a/spec/unit/type/file.rb b/spec/unit/type/file.rb index 631284e..1bd049b 100755 --- a/spec/unit/type/file.rb +++ b/spec/unit/type/file.rb @@ -5,8 +5,9 @@ require File.dirname(__FILE__) + '/../../spec_helper' describe Puppet::Type.type(:file) do before do @path = Tempfile.new("puppetspec") + pathname = @path.path @path.close!() - @path = @path.path + @path = pathname @file = Puppet::Type::File.new(:name => @path) @catalog = mock 'catalog' -- 1.6.0.2 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---