From 7509be4b0085f9e759d3c1461240f6d20eff4138 Mon Sep 17 00:00:00 2001 From: Evan Tschuy Date: Tue, 10 Nov 2015 15:56:38 -0800 Subject: convert environment hash keys to strings by converting the hash keys to strings, we can use symbols in our environment blocks: environment {FOO: 'bar', SHELL: 'zsh'} --- spec/mixlib/shellout_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec/mixlib/shellout_spec.rb') diff --git a/spec/mixlib/shellout_spec.rb b/spec/mixlib/shellout_spec.rb index df9bbbe..7e93054 100644 --- a/spec/mixlib/shellout_spec.rb +++ b/spec/mixlib/shellout_spec.rb @@ -477,6 +477,14 @@ describe Mixlib::ShellOut do end end + context 'when setting environments with symbols' do + let(:options) { { :environment => { SYMBOL: 'cymbal' } } } + + it "should also set the enviroment" do + expect(shell_cmd.environment).to eql({'SYMBOL' => 'cymbal'}) + end + end + context 'when :environment is set to nil' do let(:options) { { :environment => nil } } -- cgit v1.2.1