Sha256: 2cc9572b568e772ed7e5783406fa3bf0a372ad613845d75f7e434282f29d826e

Contents?: true

Size: 931 Bytes

Versions: 6

Compression:

Stored size: 931 Bytes

Contents

require 'spec_helper'
describe 'staging::deploy', :type => :define do

  # forcing a more sane caller_module_name to match real usage.
  let(:facts) { { :caller_module_name => 'spec',
                  :osfamily           => 'RedHat',
                  :staging_http_get   => 'curl',
                  :path               => '/usr/local/bin:/usr/bin:/bin', } }

  describe 'when deploying tar.gz' do
    let(:title) { 'sample.tar.gz' }
    let(:params) { { :source => 'puppet:///modules/staging/sample.tar.gz',
      :target => '/usr/local' } }

    it {
      should contain_file('/opt/staging')
      should contain_file('/opt/staging/spec/sample.tar.gz')
      should contain_exec('extract sample.tar.gz').with({
        :command => 'tar xzf /opt/staging/spec/sample.tar.gz',
        :path    => '/usr/local/bin:/usr/bin:/bin',
        :cwd     => '/usr/local',
        :creates => '/usr/local/sample'
      })
    }
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
puppet-retrospec-0.12.1 spec/fixtures/modules/staging/spec/defines/staging_deploy_spec.rb
puppet-retrospec-0.12.0 spec/fixtures/modules/staging/spec/defines/staging_deploy_spec.rb
puppet-retrospec-0.11.0 spec/fixtures/modules/staging/spec/defines/staging_deploy_spec.rb
puppet-retrospec-0.10.0 spec/fixtures/modules/staging/spec/defines/staging_deploy_spec.rb
puppet-retrospec-0.9.1 spec/fixtures/modules/staging/spec/defines/staging_deploy_spec.rb
puppet-retrospec-0.9.0 spec/fixtures/modules/staging/spec/defines/staging_deploy_spec.rb