Add before section to build out a tempfile and mock connections object that can be used in the tests.
Reviewed-by: Jeff McCune Signed-off-by: Dan Bode <d...@puppetlabs.com> --- spec/unit/puppet/cloudpack_spec.rb | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/spec/unit/puppet/cloudpack_spec.rb b/spec/unit/puppet/cloudpack_spec.rb index 160cb9a..985a3e1 100644 --- a/spec/unit/puppet/cloudpack_spec.rb +++ b/spec/unit/puppet/cloudpack_spec.rb @@ -103,7 +103,15 @@ describe Puppet::CloudPack do end end end - + describe '#install' do + before :all do + @keyfile = Tempfile.open('private_key') + @keyfile.write('FOO') + @keyfile.close + @ssh_mock = Fog::SSH::Mock.new('address', 'username', 'options') + @scp_mock = Fog::SCP::Mock.new('local', 'remote', {}) + end + end describe '#terminate' do describe 'with valid arguments' do before :each do -- 1.7.5.4 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.