diff --git a/spec/acceptance/deprecation_spec.rb b/spec/acceptance/deprecation_spec.rb index d0d7fedd0..973c5c84e 100644 --- a/spec/acceptance/deprecation_spec.rb +++ b/spec/acceptance/deprecation_spec.rb @@ -3,15 +3,12 @@ require 'shellwords' describe 'deprecation function' do - before :each do - FileUtils.rm_rf '/tmp/deprecation' - end context 'with --strict=error', if: get_puppet_version =~ /^4/ do before :all do pp = <<-EOS deprecation('key', 'message') - file { '/tmp/deprecation': ensure => present } + notify { 'deprecation msg': } EOS @result = on(default, puppet('apply', '--strict=error', '-e', Shellwords.shellescape(pp)), acceptable_exit_codes: (0...256)) end @@ -23,17 +20,13 @@ it "should show the error message" do expect(@result.stderr).to match(/deprecation. key. message/) end - - describe file('/tmp/deprecation') do - it { is_expected.not_to exist } - end end context 'with --strict=warning', if: get_puppet_version =~ /^4/ do before :all do pp = <<-EOS deprecation('key', 'message') - file { '/tmp/deprecation': ensure => present } + notify { 'deprecation msg': } EOS @result = on(default, puppet('apply', '--strict=warning', '-e', Shellwords.shellescape(pp)), acceptable_exit_codes: (0...256)) end @@ -45,17 +38,13 @@ it "should show the error message" do expect(@result.stderr).to match(/Warning: message/) end - - describe file('/tmp/deprecation') do - it { is_expected.to exist } - end end context 'with --strict=off', if: get_puppet_version =~ /^4/ do before :all do pp = <<-EOS deprecation('key', 'message') - file { '/tmp/deprecation': ensure => present } + notify { 'deprecation msg': } EOS @result = on(default, puppet('apply', '--strict=off', '-e', Shellwords.shellescape(pp)), acceptable_exit_codes: (0...256)) end @@ -67,9 +56,5 @@ it "should not show the error message" do expect(@result.stderr).not_to match(/Warning: message/) end - - describe file('/tmp/deprecation') do - it { is_expected.to exist } - end end end