1 require 'spec_helper_acceptance'
5 command = 'cmd.exe /c echo triggered'
7 command = 'echo triggered'
10 describe 'with metaparameters' do
11 describe 'with subscribed resources' do
12 basedir = default.tmpdir('concat')
14 context 'should trigger refresh' do
18 path => '#{basedir}/foobar',
21 concat::fragment { 'foo':
28 command => "#{command}",
29 subscribe => Concat['foobar'],
34 it 'applies the manifest twice with stdout regex' do
35 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/Triggered 'refresh'/)
36 expect(apply_manifest(pp, :catch_changes => true).stdout).to_not match(/Triggered 'refresh'/)
41 describe 'with resources to notify' do
42 basedir = default.tmpdir('concat')
43 context 'should notify' do
47 command => "#{command}",
53 path => '#{basedir}/foobar',
54 notify => Exec['trigger'],
57 concat::fragment { 'foo':
63 it 'applies the manifest twice with stdout regex' do
64 expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/Triggered 'refresh'/)
65 expect(apply_manifest(pp, :catch_changes => true).stdout).to_not match(/Triggered 'refresh'/)