From f7b7c4a6ece9d9e5d551ea77867289eee4cfe8e8 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Mon, 23 Jun 2014 15:13:29 -0700 Subject: [PATCH] Windows needs a tmpdir path --- spec/acceptance/loadyaml_spec.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/acceptance/loadyaml_spec.rb b/spec/acceptance/loadyaml_spec.rb index 944a72735..1e910a978 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 %>'))