Skip to content
This repository was archived by the owner on Oct 11, 2018. It is now read-only.

Commit f3e9c84

Browse files
committed
Merge pull request #133 from schkovich/fpm
Made parameter package_provider optional.
2 parents 68b54c5 + a0dab92 commit f3e9c84

4 files changed

Lines changed: 20 additions & 3 deletions

File tree

manifests/fpm/package.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class php::fpm::package(
66
$package_name,
77
$package_ensure,
8-
$package_provider
8+
$package_provider = undef
99
) {
1010

1111
package { $package_name:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require 'spec_helper'
2+
3+
describe 'php::fpm::package', :type => :class do
4+
context 'with package_name => php5-fpm' do
5+
let(:params) { {:package_name => 'php5-fpm', :package_ensure => 'installed'} }
6+
it { should contain_package('php5-fpm') }
7+
end
8+
end

spec/classes/fpm_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require 'spec_helper'
2+
3+
describe 'php::fpm', :type => :class do
4+
it { should contain_class('php::fpm::package') }
5+
it { should contain_class('php::fpm::service').that_requires('Package[php5-fpm]') }
6+
it { should contain_php__fpm__config('php-fpm').that_requires('Package[php5-fpm]') }
7+
it { should contain_file('/etc/php5/fpm/php-fpm.conf').that_requires('Package[php5-fpm]') }
8+
end

spec/classes/php_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
require 'spec_helper'
22

33
describe 'php', :type => :class do
4-
it { should contain_class 'php' }
5-
it { should include_class 'php::params' }
4+
it { should compile.with_all_deps }
5+
it { should contain_class('php') }
6+
it { should contain_class('php::params') }
67
end

0 commit comments

Comments
 (0)