summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorstephen <stephen@puppetlabs.com>2012-10-16 12:48:29 +0100
committerTony Bussieres <tony.bussieres@ticksmith.com>2012-12-10 16:12:21 -0500
commit89e8d1e3a6311a73409fe9fd4a9594bbf5a166ef (patch)
treef8fa1ab8428cdfbf830ff629ab019d2da77c9672 /spec
parent5d06123df9aeb4c104843827afd855d9781aa914 (diff)
have the module fail on unsupported os
Diffstat (limited to 'spec')
-rw-r--r--spec/classes/ntp_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/classes/ntp_spec.rb b/spec/classes/ntp_spec.rb
index ac68b89..389f085 100644
--- a/spec/classes/ntp_spec.rb
+++ b/spec/classes/ntp_spec.rb
@@ -60,7 +60,7 @@ describe 'ntp' do
it { should contain_service('ntp').with_name('ntpd') }
it 'should use the freebsd ntp servers by default' do
content = param_value(subject, 'file', '/etc/ntp.conf', 'content')
- expected_lines = [
+ expected_lines = [
"server 0.freebsd.pool.ntp.org iburst maxpoll 9",
"server 1.freebsd.pool.ntp.org iburst maxpoll 9",
"server 2.freebsd.pool.ntp.org iburst maxpoll 9",
@@ -68,6 +68,17 @@ describe 'ntp' do
(content.split("\n") & expected_lines).should == expected_lines
end
end
+
+ describe "for operating system unsupported" do
+ let(:facts) {{
+ :operatingsystem => 'unsupported',
+ }}
+
+ it { expect{ subject }.to raise_error(
+ /^The ntp module is not supported on unsupported/
+ )}
+ end
+
end
(redhatish + debianish + bsdish).each do |os|