diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/classes/ntp_spec.rb | 6 | ||||
-rw-r--r-- | spec/fixtures/modules/my_ntp/templates/ntp.conf.erb | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/spec/classes/ntp_spec.rb b/spec/classes/ntp_spec.rb index e74f7c1..9ce690b 100644 --- a/spec/classes/ntp_spec.rb +++ b/spec/classes/ntp_spec.rb @@ -128,6 +128,12 @@ describe 'ntp' do params[:autoupdate] = true subject.should contain_package('ntp').with_ensure('latest') end + it 'should allow template to be overridden' do + params[:config_template] = 'my_ntp/ntp.conf.erb' + content = param_value(subject, 'file', '/etc/ntp.conf', 'content') + expected_lines = ['server foobar'] + (content.split("\n") & expected_lines).should == expected_lines + end end end end diff --git a/spec/fixtures/modules/my_ntp/templates/ntp.conf.erb b/spec/fixtures/modules/my_ntp/templates/ntp.conf.erb new file mode 100644 index 0000000..40cf67c --- /dev/null +++ b/spec/fixtures/modules/my_ntp/templates/ntp.conf.erb @@ -0,0 +1,4 @@ +#my uber ntp config +# + +server foobar |