upgrade to concat 2.0.0
[mirror/dsa-puppet.git] / 3rdparty / modules / concat / spec / acceptance / quoted_paths_spec.rb
diff --git a/3rdparty/modules/concat/spec/acceptance/quoted_paths_spec.rb b/3rdparty/modules/concat/spec/acceptance/quoted_paths_spec.rb
new file mode 100644 (file)
index 0000000..042425f
--- /dev/null
@@ -0,0 +1,42 @@
+require 'spec_helper_acceptance'\r
+\r
+describe 'quoted paths' do\r
+  basedir = default.tmpdir('concat')\r
+\r
+  before(:all) do\r
+    pp = <<-EOS\r
+      file { '#{basedir}':\r
+        ensure => directory,\r
+      }\r
+      file { '#{basedir}/concat test':\r
+        ensure => directory,\r
+      }\r
+    EOS\r
+    apply_manifest(pp)\r
+  end\r
+\r
+  context 'path with blanks' do\r
+    pp = <<-EOS\r
+      concat { '#{basedir}/concat test/foo':\r
+      }\r
+      concat::fragment { '1':\r
+        target  => '#{basedir}/concat test/foo',\r
+        content => 'string1',\r
+      }\r
+      concat::fragment { '2':\r
+        target  => '#{basedir}/concat test/foo',\r
+        content => 'string2',\r
+      }\r
+    EOS\r
+\r
+    it 'applies the manifest twice with no stderr' do\r
+      apply_manifest(pp, :catch_failures => true)\r
+      apply_manifest(pp, :catch_changes => true)\r
+    end\r
+\r
+    describe file("#{basedir}/concat test/foo") do\r
+      it { should be_file }\r
+      its(:content) { should match /string1string2/ }\r
+    end\r
+  end\r
+end\r