We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29f431f commit 19c1e85Copy full SHA for 19c1e85
1 file changed
chef/spec/unit/provider/template_spec.rb
@@ -21,7 +21,9 @@
21
describe Chef::Provider::Template, "action_create" do
22
before(:each) do
23
@rest = mock(Chef::REST, { :get_rest => "/tmp/foobar" })
24
- @tempfile = mock(Tempfile, { :path => "/tmp/foo", })
+ @tempfile = mock(Tempfile, { :path => "/tmp/foo", :print => true, :close => true })
25
+ Tempfile.stub!(:new).and_return(@tempfile)
26
+ File.stub!(:read).and_return("monkeypoop")
27
@rest.stub!(:get_rest).and_return(@tempfile)
28
@resource = Chef::Resource::Template.new("seattle")
29
@resource.path(File.join(File.dirname(__FILE__), "..", "..", "data", "seattle.txt"))
0 commit comments