diff options
Diffstat (limited to 'spec/system/basic_spec.rb')
-rw-r--r-- | spec/system/basic_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/system/basic_spec.rb b/spec/system/basic_spec.rb new file mode 100644 index 0000000..87fedd2 --- /dev/null +++ b/spec/system/basic_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper_system' + +describe 'basic tests:' do + # Using puppet_apply as a subject + context puppet_apply 'notice("foo")' do + its(:stdout) { should =~ /foo/ } + its(:stderr) { should be_empty } + its(:exit_code) { should be_zero } + end + + # Using puppet_apply as a helper + it 'my class should work with no errors' do + pp = <<-EOS + class { 'ntp': } + EOS + + # Run it twice and test for idempotency + puppet_apply(pp) do |r| + r.exit_code.should_not == 1 + r.refresh + r.exit_code.should be_zero + end + end +end + |