1 require 'spec_helper_acceptance'
3 describe 'defined_with_params function' do
10 if defined_with_params(User[dan], {'ensure' => 'present' }) {
11 notify { 'User defined with ensure=>present': }
14 it 'successfullies checks a type' do
15 apply_manifest(pp1, :catch_failures => true) do |r|
16 expect(r.stdout).to match(%r{Notice: User defined with ensure=>present})
29 if defined_with_params(Class[foo], { 'bar' => 'baz' }) {
30 notify { 'Class foo defined with bar=>baz': }
33 it 'successfullies checks a class' do
34 apply_manifest(pp2, :catch_failures => true) do |r|
35 expect(r.stdout).to match(%r{Notice: Class foo defined with bar=>baz})