Update stdlib
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / anchor_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'anchor type' do
4   describe 'success' do
5     it 'should effect proper chaining of resources' do
6       pp = <<-EOS
7       class anchored {
8         anchor { 'anchored::begin': }
9         ~> anchor { 'anchored::end': }
10       }
11
12       class anchorrefresh {
13         notify { 'first': }
14         ~> class { 'anchored': }
15         ~> anchor { 'final': }
16       }
17
18       include anchorrefresh
19       EOS
20
21       apply_manifest(pp, :catch_failures => true) do |r|
22         expect(r.stdout).to match(/Anchor\[final\]: Triggered 'refresh'/)
23       end
24     end
25   end
26 end