summaryrefslogtreecommitdiff
path: root/template-test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'template-test.rb')
-rw-r--r--template-test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/template-test.rb b/template-test.rb
new file mode 100644
index 0000000000..bc227164f6
--- /dev/null
+++ b/template-test.rb
@@ -0,0 +1,11 @@
+$:.unshift(File.expand_path("../lib", __FILE__))
+
+require 'chef'
+
+TEST_FILE = "/tmp/whyrun-test.txt"
+
+Chef::Config[:why_run] = true
+
+r = Chef::Resource::File.new(TEST_FILE)
+r.content("#{Time.new}")
+r.run_action(:create)