Ignore:
Timestamp:
Aug 1, 2017, 3:45:14 PM (9 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
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.
Message:

Merge branch 'master' into debian/jessie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/puppetcode/environments/gnuboat/modules/stdlib/spec/functions/is_bool_spec.rb

    rbcf0be5 rad28f83  
    22
    33describe 'is_bool' do
     4 
    45  it { is_expected.not_to eq(nil) }
    56  it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
    … …  
    1314  it { is_expected.to run.with_params('true').and_return(false) }
    1415  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
    1532end
     33
Note: See TracChangeset for help on using the changeset viewer.