Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit 637fb9c

Browse files
committed
Fixes syntax and specs
1 parent 2dbaeb8 commit 637fb9c

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

manifests/extension/xhprof.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
define php::extension::xhprof(
1111
$php,
1212
$version = '0.9.4',
13-
$config_template = "php/extensions/xhprof.ini.erb"
13+
$config_template = 'php/extensions/xhprof.ini.erb'
1414
) {
1515
require php::config
1616
# Require php version eg. php::5_4_10
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
require 'spec_helper'
2+
3+
describe "php::extension::xhprof" do
4+
let(:facts) { default_test_facts }
5+
let(:title) { "xhprof for 5.4.17" }
6+
let(:params) do
7+
{
8+
:php => "5.4.17",
9+
:version => "0.9.4"
10+
}
11+
end
12+
13+
it do
14+
should include_class("php::config")
15+
should include_class("php::5_4_17")
16+
17+
should contain_php_extension("xhprof for 5.4.17").with({
18+
:extension => "xhprof",
19+
:version => "0.9.4",
20+
:package_name => "xhprof-0.9.4",
21+
:package_url => "http://pecl.php.net/get/xhprof-0.9.4.tgz",
22+
:homebrew_path => "/test/boxen/homebrew",
23+
:phpenv_root => "/test/boxen/phpenv",
24+
:php_version => "5.4.17",
25+
:cache_dir => "/test/boxen/data/php/cache/extensions",
26+
})
27+
28+
should contain_file("/test/boxen/config/php/5.4.17/conf.d/xhprof.ini").with({
29+
:content => File.read("spec/fixtures/xhprof.ini"),
30+
:require => "Php_extension[xhprof for 5.4.17]"
31+
})
32+
end
33+
end

spec/fixtures/xhprof.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extension=/test/boxen/phpenv/versions/5.4.17/modules/xhprof.so

0 commit comments

Comments
 (0)