puppetlabs-stdlib/spec/acceptance/ensure_resource_spec.rb
David Schmitt 02965b89e5 (FM-3802) make ensure_resource test of packages
This ensures that the test passes independently of changes to rubygems.
2015-12-17 13:50:15 +00:00

30 lines
748 B
Ruby
Executable file

#! /usr/bin/env ruby -S rspec
require 'spec_helper_acceptance'
describe 'ensure_resource function' do
describe 'success' do
it 'ensures a resource already declared' do
apply_manifest('')
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' })
EOS
apply_manifest(pp, :expect_changes => true)
end
it 'takes defaults arguments'
end
describe 'failure' do
it 'handles no arguments'
it 'handles non strings'
end
end