puppetlabs-stdlib/spec/classes/anchor_spec.rb
Ashley Penney 3854e076cc Numerous changes to update testing gems.
This work updates a number of Gems to the latest versions (rspec,
rspec-puppet), and updates and tweaks a bunch of tests to work
with the updated gems.
2014-03-08 00:42:51 +00:00

29 lines
638 B
Ruby

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