Changeset ad28f83 for src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_bool_spec.rb
- Timestamp:
- Aug 1, 2017, 3:45:14 PM (9 years ago)
- Branches:
- debian/bullseye, debian/jessie
- Children:
- ce0f6a4
- Parents:
- bcf0be5 (diff), cd0f9cc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_bool_spec.rb
rbcf0be5 rad28f83 2 2 3 3 describe 'is_bool' do 4 4 5 it { is_expected.not_to eq(nil) } 5 6 it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } … … 13 14 it { is_expected.to run.with_params('true').and_return(false) } 14 15 it { is_expected.to run.with_params('false').and_return(false) } 16 context 'Checking for deprecation warning' do 17 after(:all) do 18 ENV.delete('STDLIB_LOG_DEPRECATIONS') 19 end 20 # Checking for deprecation warning, which should only be provoked when the env variable for it is set. 21 it 'should display a single deprecation' do 22 ENV['STDLIB_LOG_DEPRECATIONS'] = "true" 23 scope.expects(:warning).with(includes('This method is deprecated')) 24 is_expected.to run.with_params(true).and_return(true) 25 end 26 it 'should display no warning for deprecation' do 27 ENV['STDLIB_LOG_DEPRECATIONS'] = "false" 28 scope.expects(:warning).with(includes('This method is deprecated')).never 29 is_expected.to run.with_params(false).and_return(true) 30 end 31 end 15 32 end 33
Note:
See TracChangeset
for help on using the changeset viewer.
