Skip to content

Commit

Permalink
Merge pull request redhat-openstack#281 from hunner/win_loadyaml
Browse files Browse the repository at this point in the history
Windows needs a tmpdir path
  • Loading branch information
cyberious committed Jun 23, 2014
2 parents d38ccfc + f7b7c4a commit a6b5737
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spec/acceptance/loadyaml_spec.rb
Original file line number Diff line number Diff line change
@@ -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 %>'))
Expand Down

0 comments on commit a6b5737

Please sign in to comment.