Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / concat / spec / acceptance / noop_spec.rb
diff --git a/3rdparty/modules/concat/spec/acceptance/noop_spec.rb b/3rdparty/modules/concat/spec/acceptance/noop_spec.rb
new file mode 100644 (file)
index 0000000..3432ae7
--- /dev/null
@@ -0,0 +1,26 @@
+require 'spec_helper_acceptance'
+
+describe 'concat noop parameter', if: ['debian', 'redhat', 'ubuntu'].include?(os[:family]) do
+  before(:all) do
+    @basedir = setup_test_directory
+  end
+  describe 'with "/usr/bin/test -e %"' do
+    let(:pp) do
+      <<-MANIFEST
+      concat_file { '#{@basedir}/file':
+        noop => false,
+      }
+      concat_fragment { 'content':
+        target  => '#{@basedir}/file',
+        content => 'content',
+      }
+    MANIFEST
+    end
+
+    it 'applies the manifest twice with no stderr' do
+      idempotent_apply(pp)
+      expect(file("#{@basedir}/file")).to be_file
+      expect(file("#{@basedir}/file").content).to contain 'content'
+    end
+  end
+end