adding failing tests for fixnum args in an array.

The args need to be strings so that an error won't happen with `text.gsub` in bb052366f7/plugins/provisioners/shell/provisioner.rb (L122)

See my comments on mitchellh/vagrant#2982 as to why it needs to test for this.
This commit is contained in:
Ben Dean 2014-07-11 17:08:07 -04:00
parent efd1d5e11b
commit 7dc0e4340e
1 changed files with 18 additions and 0 deletions

View File

@ -86,4 +86,22 @@ describe "VagrantPlugins::Shell::Config" do
])
end
end
describe 'finalize!' do
it 'changes fixnum args into strings' do
subject.path = file_that_exists
subject.args = 1
subject.finalize!
expect(subject.args).to eq '1'
end
it 'changes fixnum args in arrays into strings' do
subject.path = file_that_exists
subject.args = ["string", 1, 2]
subject.finalize!
expect(subject.args).to eq ["string", '1', '2']
end
end
end