1 require 'spec_helper_acceptance'
3 command = case os[:family]
5 'cmd.exe /c echo triggered'
10 describe 'with metaparameters' do
12 @basedir = setup_test_directory
15 describe 'with subscribed resources' do
20 path => '#{@basedir}/foobar',
23 concat::fragment { 'foo':
30 command => "#{command}",
31 subscribe => Concat['foobar'],
37 it 'applies the manifest twice with no changes second apply' do
38 expect(apply_manifest(pp, catch_failures: true).stdout).to match(%r{Triggered 'refresh'})
39 expect(apply_manifest(pp, catch_changes: true).stdout).not_to match(%r{Triggered 'refresh'})
43 describe 'with resources to notify' do
48 command => "#{command}",
54 path => '#{@basedir}/foobar',
55 notify => Exec['trigger'],
58 concat::fragment { 'foo':
65 it 'applies the manifest twice with no changes second apply' do
66 expect(apply_manifest(pp, catch_failures: true).stdout).to match(%r{Triggered 'refresh'})
67 expect(apply_manifest(pp, catch_changes: true).stdout).not_to match(%r{Triggered 'refresh'})