X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fconcat%2Fspec%2Facceptance%2Fsymbolic_name_spec.rb;h=1a55a842a476246335ebea698fbbcc9ece802b6c;hp=df8d54f5250c30d4cb93efa94095be6b346ef046;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/concat/spec/acceptance/symbolic_name_spec.rb b/3rdparty/modules/concat/spec/acceptance/symbolic_name_spec.rb index df8d54f52..1a55a842a 100644 --- a/3rdparty/modules/concat/spec/acceptance/symbolic_name_spec.rb +++ b/3rdparty/modules/concat/spec/acceptance/symbolic_name_spec.rb @@ -1,35 +1,34 @@ require 'spec_helper_acceptance' describe 'symbolic name' do - basedir = default.tmpdir('concat') - pp = <<-EOS - concat { 'not_abs_path': - path => '#{basedir}/file', - } + before(:all) do + @basedir = setup_test_directory + end - concat::fragment { '1': - target => 'not_abs_path', - content => '1', - order => '01', - } + let(:pp) do + <<-MANIFEST + concat { 'not_abs_path': + path => '#{@basedir}/file', + } - concat::fragment { '2': - target => 'not_abs_path', - content => '2', - order => '02', - } - EOS + concat::fragment { '1': + target => 'not_abs_path', + content => '1', + order => '01', + } - it 'applies the manifest twice with no stderr' do - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) + concat::fragment { '2': + target => 'not_abs_path', + content => '2', + order => '02', + } + MANIFEST end - describe file("#{basedir}/file") do - it { should be_file } - its(:content) { - should match '1' - should match '2' - } + 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 match '1' + expect(file("#{@basedir}/file").content).to match '2' end end