summaryrefslogtreecommitdiff
path: root/spec/acceptance/anchor_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/acceptance/anchor_spec.rb')
-rwxr-xr-xspec/acceptance/anchor_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/acceptance/anchor_spec.rb b/spec/acceptance/anchor_spec.rb
new file mode 100755
index 0000000..5bc2bbb
--- /dev/null
+++ b/spec/acceptance/anchor_spec.rb
@@ -0,0 +1,26 @@
+require 'spec_helper_acceptance'
+
+describe 'anchor type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'should effect proper chaining of resources' do
+ pp = <<-EOS
+ class anchored {
+ anchor { 'anchored::begin': }
+ ~> anchor { 'anchored::end': }
+ }
+
+ class anchorrefresh {
+ notify { 'first': }
+ ~> class { 'anchored': }
+ ~> anchor { 'final': }
+ }
+
+ include anchorrefresh
+ EOS
+
+ apply_manifest(pp, :catch_failures => true) do |r|
+ expect(r.stdout).to match(/Anchor\[final\]: Triggered 'refresh'/)
+ end
+ end
+ end
+end