summaryrefslogtreecommitdiff
path: root/spec/support/chef_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/chef_helpers.rb')
-rw-r--r--spec/support/chef_helpers.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/spec/support/chef_helpers.rb b/spec/support/chef_helpers.rb
index d0b5ad0bfd..a45b9faa70 100644
--- a/spec/support/chef_helpers.rb
+++ b/spec/support/chef_helpers.rb
@@ -29,26 +29,6 @@ def sha256_checksum(path)
OpenSSL::Digest::SHA256.hexdigest(File.read(path))
end
-# From Ruby 1.9.2+
-# Here for backwards compatibility with Ruby 1.8.7
-# http://rubydoc.info/stdlib/tmpdir/1.9.2/Dir/Tmpname
-def make_tmpname(prefix_suffix, n = nil)
- case prefix_suffix
- when String
- prefix = prefix_suffix
- suffix = ""
- when Array
- prefix = prefix_suffix[0]
- suffix = prefix_suffix[1]
- else
- raise ArgumentError, "unexpected prefix_suffix: #{prefix_suffix.inspect}"
- end
- t = Time.now.strftime("%Y%m%d")
- path = "#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}"
- path << "-#{n}" if n
- path << suffix
-end
-
# NOTE:
# This is a temporary fix to get tests passing on systems that have no `diff`
# until we can replace shelling out to `diff` with ruby diff-lcs