diff options
author | Lamont Granquist <lamont@opscode.com> | 2013-01-29 16:56:49 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-01-29 18:44:11 -0800 |
commit | 7b3e88e6a7759edd96843b816bc15efab16f8d55 (patch) | |
tree | 55f4b9cb11d75d4e775f5bb7348cf25a01d03216 /spec/unit/api_client | |
parent | bb103422a98616c3ac72cea355e9799a542cae85 (diff) | |
download | chef-7b3e88e6a7759edd96843b816bc15efab16f8d55.tar.gz |
use make_tmpname to avoid finalizer races
Diffstat (limited to 'spec/unit/api_client')
-rw-r--r-- | spec/unit/api_client/registration_spec.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/spec/unit/api_client/registration_spec.rb b/spec/unit/api_client/registration_spec.rb index 892b22e1b8..076c230a25 100644 --- a/spec/unit/api_client/registration_spec.rb +++ b/spec/unit/api_client/registration_spec.rb @@ -23,10 +23,7 @@ require 'chef/api_client/registration' describe Chef::ApiClient::Registration do let(:key_location) do - path = nil - Tempfile.open("client-registration-key") {|f| path = f.path } - File.unlink(path) - path + make_tmpname("client-registration-key",0) end let(:registration) { Chef::ApiClient::Registration.new("silent-bob", key_location) } |