Skip to content

Commit 3031f97

Browse files
committed
replace template with epp function stub
fix misspelling in fail function
1 parent c4876b8 commit 3031f97

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

manifests/manage.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
case $type {
5757
'file': {
5858
if 'template' in $attributes and 'content' in $attributes {
59-
fail("You can not set content and template fir file ${title}")
59+
fail("You can not set 'content' and 'template' for file ${title}")
6060
}
6161
if 'template' in $attributes {
6262
$content = epp($attributes['template'])

spec/classes/manage_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
}
4040
}
4141
end
42+
Puppet::Functions.create_function(:'epp') do
43+
return 'I am a template'
44+
end
4245

4346
it { is_expected.to compile }
4447
it { is_expected.to contain_file('/etc/motd.d/hello').with_content('I say Hi').with_notify('Service[sshd]') }

templates/manage_spec.epp

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)