2 describe 'staging::deploy', :type => :define do
4 # forcing a more sane caller_module_name to match real usage.
5 let(:facts) { { :caller_module_name => 'spec',
7 :staging_http_get => 'curl',
8 :path => '/usr/local/bin:/usr/bin:/bin', } }
10 describe 'when deploying tar.gz' do
11 let(:title) { 'sample.tar.gz' }
12 let(:params) { { :source => 'puppet:///modules/staging/sample.tar.gz',
13 :target => '/usr/local' } }
16 should contain_file('/opt/staging')
17 should contain_file('/opt/staging/spec/sample.tar.gz')
18 should contain_exec('extract sample.tar.gz').with({
19 :command => 'tar xzf /opt/staging/spec/sample.tar.gz',
20 :path => '/usr/local/bin:/usr/bin:/bin',
22 :creates => '/usr/local/sample'