+ it 'when true should enable default warning message' do
+ idempotent_apply(pp)
+ expect(file("#{@basedir}/file")).to be_file
+ expect(file("#{@basedir}/file").content).to match %r{# This file is managed by Puppet\. DO NOT EDIT\.}
+ expect(file("#{@basedir}/file").content).to match %r{1}
+ expect(file("#{@basedir}/file").content).to match %r{2}
+ end
+
+ it 'when false should not enable default warning message' do
+ expect(file("#{@basedir}/file2")).to be_file
+ expect(file("#{@basedir}/file2").content).not_to match %r{# This file is managed by Puppet\. DO NOT EDIT\.}
+ expect(file("#{@basedir}/file2").content).to match %r{1}
+ expect(file("#{@basedir}/file2").content).to match %r{2}
+ end
+
+ it 'when foo should overide default warning message' do
+ expect(file("#{@basedir}/file3")).to be_file
+ expect(file("#{@basedir}/file3").content).to match %r{# foo}
+ expect(file("#{@basedir}/file3").content).to match %r{1}
+ expect(file("#{@basedir}/file3").content).to match %r{2}