puppetlabs-stdlib/spec/acceptance/ensure_resource_spec.rb

31 lines
748 B
Ruby
Raw Normal View History

2014-05-07 03:48:59 +02:00
#! /usr/bin/env ruby -S rspec
require 'spec_helper_acceptance'
describe 'ensure_resource function' do
2014-05-07 03:48:59 +02:00
describe 'success' do
it 'ensures a resource already declared' do
apply_manifest('')
2014-05-07 03:48:59 +02:00
pp = <<-EOS
notify { "test": loglevel => 'err' }
ensure_resource('notify', 'test', { 'loglevel' => 'err' })
EOS
apply_manifest(pp, :expect_changes => true)
end
it 'ensures a undeclared resource' do
apply_manifest('')
pp = <<-EOS
ensure_resource('notify', 'test', { 'loglevel' => 'err' })
2014-05-07 03:48:59 +02:00
EOS
2014-06-20 19:41:43 +02:00
apply_manifest(pp, :expect_changes => true)
2014-05-07 03:48:59 +02:00
end
it 'takes defaults arguments'
end
describe 'failure' do
it 'handles no arguments'
it 'handles non strings'
end
end