From e7a3a21c0769f422e1cea98cc2b06a3434c7a46d Mon Sep 17 00:00:00 2001 From: Ashley Penney Date: Fri, 9 Aug 2013 09:15:28 -0700 Subject: Add specs for restrict. --- spec/system/restrict_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spec/system/restrict_spec.rb diff --git a/spec/system/restrict_spec.rb b/spec/system/restrict_spec.rb new file mode 100644 index 0000000..ae23bc0 --- /dev/null +++ b/spec/system/restrict_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper_system' + +describe "ntp class with restrict:" do + context 'should run successfully' do + pp = "class { 'ntp': restrict => ['test restrict']}" + + context puppet_apply(pp) do + its(:stderr) { should be_empty } + its(:exit_code) { should_not == 1 } + its(:refresh) { should be_nil } + its(:stderr) { should be_empty } + its(:exit_code) { should be_zero } + end + end + + describe file('/etc/ntp.conf') do + it { should contain('test restrict') } + end + +end -- cgit v1.2.3