-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #297 from bmjen/o_____p
re-add removed params for backwards compatibility
- Loading branch information
Showing
5 changed files
with
84 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'deprecation warnings' do | ||
basedir = default.tmpdir('concat') | ||
|
||
shared_examples 'has_warning' do |pp, w| | ||
it 'applies the manifest twice with a stderr regex' do | ||
expect(apply_manifest(pp, :catch_failures => true).stderr).to match(/#{Regexp.escape(w)}/m) | ||
expect(apply_manifest(pp, :catch_changes => true).stderr).to match(/#{Regexp.escape(w)}/m) | ||
end | ||
end | ||
|
||
context 'concat force parameter' do | ||
pp = <<-EOS | ||
concat { '#{basedir}/file': | ||
force => false, | ||
} | ||
concat::fragment { 'foo': | ||
target => '#{basedir}/file', | ||
content => 'bar', | ||
} | ||
EOS | ||
w = 'The $force parameter to concat is deprecated and has no effect.' | ||
|
||
it_behaves_like 'has_warning', pp, w | ||
end | ||
|
||
context 'concat::fragment ensure parameter' do | ||
context 'target file exists' do | ||
pp = <<-EOS | ||
concat { '#{basedir}/file': | ||
} | ||
concat::fragment { 'foo': | ||
target => '#{basedir}/file', | ||
ensure => false, | ||
content => 'bar', | ||
} | ||
EOS | ||
w = 'The $ensure parameter to concat::fragment is deprecated and has no effect.' | ||
|
||
it_behaves_like 'has_warning', pp, w | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters