Sha256: 2ba69ff32228e462fd8ca8f6976ac233bd58e6b66ef8a0059119eb82ee4d9e06

Contents?: true

Size: 346 Bytes

Versions: 17

Compression:

Stored size: 346 Bytes

Contents

require 'fileutils'
require 'tempfile'

# A support module for testing files.
module PuppetSpec::Files
  def tmpfile(name)
    source = Tempfile.new(name)
    path = source.path
    source.close!
    $tmpfiles ||= []
    $tmpfiles << path
    path
  end

  def tmpdir(name)
    file = tmpfile(name)
    FileUtils.mkdir_p(file)
    file
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
puppet-2.6.18 spec/lib/puppet_spec/files.rb
puppet-2.6.17 spec/lib/puppet_spec/files.rb
puppet-2.6.16 spec/lib/puppet_spec/files.rb
puppet-2.6.15 spec/lib/puppet_spec/files.rb
puppet-2.6.14 spec/lib/puppet_spec/files.rb
puppet-2.6.13 spec/lib/puppet_spec/files.rb
puppet-2.6.12 spec/lib/puppet_spec/files.rb
puppet-2.6.11 spec/lib/puppet_spec/files.rb
puppet-2.6.10 spec/lib/puppet_spec/files.rb
puppet-2.6.9 spec/lib/puppet_spec/files.rb
puppet-2.6.8 spec/lib/puppet_spec/files.rb
puppet-2.6.7 spec/lib/puppet_spec/files.rb
puppet-2.6.6 spec/lib/puppet_spec/files.rb
puppet-2.6.5 spec/lib/puppet_spec/files.rb
puppet-2.6.4 spec/lib/puppet_spec/files.rb
puppet-2.6.3 spec/lib/puppet_spec/files.rb
puppet-2.6.2 spec/lib/puppet_spec/files.rb