Sha256: 60d3747c333b9791b8322c381f03a2e1cb4643d6961db130b1b27712442a381e

Contents?: true

Size: 1.05 KB

Versions: 7

Compression:

Stored size: 1.05 KB

Contents

require 'spec_helper'

describe 'postgresql::server::plperl', :type => :class do
  let :facts do
    {
      :osfamily => 'Debian',
      :operatingsystem => 'Debian',
      :operatingsystemrelease => '6.0',
      :kernel => 'Linux',
      :concat_basedir => tmpfilename('plperl'),
    }
  end

  let :pre_condition do
    "class { 'postgresql::server': }"
  end

  describe 'with no parameters' do
    it { should include_class("postgresql::server::plperl") }
    it 'should create package' do
      should contain_package('postgresql-plperl').with({
        :ensure => 'present',
        :tag => 'postgresql',
      })
    end
  end

  describe 'with parameters' do
    let :params do
      {
        :package_ensure => 'absent',
        :package_name => 'mypackage',
      }
    end

    it { should include_class("postgresql::server::plperl") }
    it 'should create package with correct params' do
      should contain_package('postgresql-plperl').with({
        :ensure => 'absent',
        :name => 'mypackage',
        :tag => 'postgresql',
      })
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
freighthop-0.3.3 modules/postgresql/spec/unit/classes/server/plperl_spec.rb
freighthop-0.3.2 modules/postgresql/spec/unit/classes/server/plperl_spec.rb
freighthop-0.3.1 modules/postgresql/spec/unit/classes/server/plperl_spec.rb
freighthop-0.3.0 modules/postgresql/spec/unit/classes/server/plperl_spec.rb
freighthop-0.2.1 modules/postgresql/spec/unit/classes/server/plperl_spec.rb
freighthop-0.2.0 modules/postgresql/spec/unit/classes/server/plperl_spec.rb
freighthop-0.1.0 modules/postgresql/spec/unit/classes/server/plperl_spec.rb