Sha256: fce81bc0d3ddd3e4bebec6159fc4d56fff1a799db6981d7bca55bffc914061bf

Contents?: true

Size: 408 Bytes

Versions: 24

Compression:

Stored size: 408 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'
      ENV[varname] = "\u16A0"

      expect(ENV[varname]).to eq("\u16A0")

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

      expect(ENV[varname]).to be_nil
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
puppet-8.3.0 spec/unit/test/test_helper_spec.rb
puppet-8.3.0-x86-mingw32 spec/unit/test/test_helper_spec.rb
puppet-8.3.0-x64-mingw32 spec/unit/test/test_helper_spec.rb
puppet-8.3.0-universal-darwin spec/unit/test/test_helper_spec.rb
puppet-8.4.0 spec/unit/test/test_helper_spec.rb
puppet-8.4.0-x86-mingw32 spec/unit/test/test_helper_spec.rb
puppet-8.4.0-x64-mingw32 spec/unit/test/test_helper_spec.rb
puppet-8.4.0-universal-darwin spec/unit/test/test_helper_spec.rb
puppet-8.3.1 spec/unit/test/test_helper_spec.rb
puppet-8.3.1-x86-mingw32 spec/unit/test/test_helper_spec.rb
puppet-8.3.1-x64-mingw32 spec/unit/test/test_helper_spec.rb
puppet-8.3.1-universal-darwin spec/unit/test/test_helper_spec.rb
puppet-8.2.0 spec/unit/test/test_helper_spec.rb
puppet-8.2.0-x86-mingw32 spec/unit/test/test_helper_spec.rb
puppet-8.2.0-x64-mingw32 spec/unit/test/test_helper_spec.rb
puppet-8.2.0-universal-darwin spec/unit/test/test_helper_spec.rb
puppet-8.1.0 spec/unit/test/test_helper_spec.rb
puppet-8.1.0-x86-mingw32 spec/unit/test/test_helper_spec.rb
puppet-8.1.0-x64-mingw32 spec/unit/test/test_helper_spec.rb
puppet-8.1.0-universal-darwin spec/unit/test/test_helper_spec.rb