Sha256: f8dadb5ebc0923e7a0c9c6c5edd0d161bfbcb798f60e957028d92dc6601e46bb

Contents?: true

Size: 458 Bytes

Versions: 192

Compression:

Stored size: 458 Bytes

Contents

require 'spec_helper'

describe "TestHelper" do
  context "#after_each_test" do
    it "restores the original environment" do
      varname = 'test_helper_spec-test_variable'
      Puppet::Util.set_env(varname, "\u16A0")

      expect(Puppet::Util.get_env(varname)).to eq("\u16A0")

      # Prematurely trigger the after_each_test method
      Puppet::Test::TestHelper.after_each_test

      expect(Puppet::Util::get_env(varname)).to be_nil
    end
  end
end

Version data entries

192 entries across 192 versions & 1 rubygems

Version Path
puppet-7.28.0 spec/unit/test/test_helper_spec.rb
puppet-7.28.0-x86-mingw32 spec/unit/test/test_helper_spec.rb
puppet-7.28.0-x64-mingw32 spec/unit/test/test_helper_spec.rb
puppet-7.28.0-universal-darwin spec/unit/test/test_helper_spec.rb
puppet-7.27.0 spec/unit/test/test_helper_spec.rb
puppet-7.27.0-x86-mingw32 spec/unit/test/test_helper_spec.rb
puppet-7.27.0-x64-mingw32 spec/unit/test/test_helper_spec.rb
puppet-7.27.0-universal-darwin spec/unit/test/test_helper_spec.rb
puppet-7.26.0 spec/unit/test/test_helper_spec.rb
puppet-7.26.0-x86-mingw32 spec/unit/test/test_helper_spec.rb
puppet-7.26.0-x64-mingw32 spec/unit/test/test_helper_spec.rb
puppet-7.26.0-universal-darwin spec/unit/test/test_helper_spec.rb
puppet-7.25.0 spec/unit/test/test_helper_spec.rb
puppet-7.25.0-x86-mingw32 spec/unit/test/test_helper_spec.rb
puppet-7.25.0-x64-mingw32 spec/unit/test/test_helper_spec.rb
puppet-7.25.0-universal-darwin spec/unit/test/test_helper_spec.rb
puppet-7.24.0 spec/unit/test/test_helper_spec.rb
puppet-7.24.0-x86-mingw32 spec/unit/test/test_helper_spec.rb
puppet-7.24.0-x64-mingw32 spec/unit/test/test_helper_spec.rb
puppet-7.24.0-universal-darwin spec/unit/test/test_helper_spec.rb