summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppetlabs.com>2014-06-23 15:13:29 -0700
committerHunter Haugen <hunter@puppetlabs.com>2014-06-23 15:13:29 -0700
commitf7b7c4a6ece9d9e5d551ea77867289eee4cfe8e8 (patch)
treefdc0b2444e4a044fc53da190296626e03ad157e7 /spec
parentd38ccfc9d2721fce8e7e92469faf9746f3400de6 (diff)
Windows needs a tmpdir path
Diffstat (limited to 'spec')
-rw-r--r--spec/acceptance/loadyaml_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/acceptance/loadyaml_spec.rb b/spec/acceptance/loadyaml_spec.rb
index 944a727..1e910a9 100644
--- a/spec/acceptance/loadyaml_spec.rb
+++ b/spec/acceptance/loadyaml_spec.rb
@@ -1,16 +1,18 @@
#! /usr/bin/env ruby -S rspec
require 'spec_helper_acceptance'
+tmpdir = default.tmpdir('stdlib')
+
describe 'loadyaml function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
describe 'success' do
it 'loadyamls array of values' do
- shell('echo "---
+ shell("echo '---
aaa: 1
bbb: 2
ccc: 3
- ddd: 4" > /testyaml.yaml')
+ ddd: 4' > #{tmpdir}/testyaml.yaml")
pp = <<-EOS
- $o = loadyaml('/testyaml.yaml')
+ $o = loadyaml('#{tmpdir}/testyaml.yaml')
notice(inline_template('loadyaml[aaa] is <%= @o["aaa"].inspect %>'))
notice(inline_template('loadyaml[bbb] is <%= @o["bbb"].inspect %>'))
notice(inline_template('loadyaml[ccc] is <%= @o["ccc"].inspect %>'))