blob: 2d4455e417e191fbf1379f3c8a2798c03e3eb6a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#! /usr/bin/env ruby -S rspec
require 'spec_helper'
require 'puppet_spec/compiler'
describe "anchorrefresh" do
include PuppetSpec::Compiler
let :transaction do
apply_compiled_manifest(<<-ANCHORCLASS)
class anchored {
anchor { 'anchored::begin': }
~> anchor { 'anchored::end': }
}
class anchorrefresh {
notify { 'first': }
~> class { 'anchored': }
~> anchor { 'final': }
}
include anchorrefresh
ANCHORCLASS
end
it 'propagates events through the anchored class' do
resource = transaction.resource_status('Anchor[final]')
expect(resource.restarted).to eq(true)
end
end
|