diff options
author | John McCrae <john.mccrae@progress.com> | 2022-10-03 04:29:22 +0000 |
---|---|---|
committer | John McCrae <john.mccrae@progress.com> | 2022-10-03 04:29:22 +0000 |
commit | 6d056a4f230cda6e01be04588bb7f5290f9db926 (patch) | |
tree | 9447b9e0d9d3d01272c054fe650d1814a74557fc | |
parent | 7ba498776ac5a38c50e3125e2d3f376aebdd32a8 (diff) | |
download | chef-jfm/server_2012_errors.tar.gz |
replacing Tempfile.new with Tempfile.createjfm/server_2012_errors
Signed-off-by: John McCrae <john.mccrae@progress.com>
-rw-r--r-- | knife/spec/unit/knife/bootstrap/train_connector_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/knife/spec/unit/knife/bootstrap/train_connector_spec.rb b/knife/spec/unit/knife/bootstrap/train_connector_spec.rb index 0a1091fa8d..ddf652e0eb 100644 --- a/knife/spec/unit/knife/bootstrap/train_connector_spec.rb +++ b/knife/spec/unit/knife/bootstrap/train_connector_spec.rb @@ -18,6 +18,7 @@ require "knife_spec_helper" require "ostruct" require "chef/knife/bootstrap/train_connector" +require "tempfile" unless defined?(Tempfile) describe Chef::Knife::Bootstrap::TrainConnector do let(:protocol) { "mock" } @@ -198,7 +199,7 @@ describe Chef::Knife::Bootstrap::TrainConnector do expect(File.read(local_path)).to eq "test data" expect(remote_path).to eq "/target/path" end - expect_any_instance_of(Tempfile).to receive(:binmode) + expect_any_instance_of(Tempfile).to receive(:binmode).with(true) subject.upload_file_content!("test data", "/target/path") end end |