Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / anchor_spec.rb
old mode 100755 (executable)
new mode 100644 (file)
index 24a9064..fda1674
@@ -1,9 +1,8 @@
 require 'spec_helper_acceptance'
 
 describe 'anchor type' do
-  describe 'success' do
-    it 'should effect proper chaining of resources' do
-      pp = <<-EOS
+  let(:pp) do
+    <<-MANIFEST
       class anchored {
         anchor { 'anchored::begin': }
         ~> anchor { 'anchored::end': }
@@ -16,11 +15,12 @@ describe 'anchor type' do
       }
 
       include anchorrefresh
-      EOS
+    MANIFEST
+  end
 
-      apply_manifest(pp, :catch_failures => true) do |r|
-        expect(r.stdout).to match(/Anchor\[final\]: Triggered 'refresh'/)
-      end
+  it 'applies manifest, anchors resources in correct order' do
+    apply_manifest(pp) do |r|
+      expect(r.stdout).to match(%r{Anchor\[final\]: Triggered 'refresh'})
     end
   end
 end