Sha256: f78d1a3409afd35c13e96f723cab57c35642b62e9785913b957b883f9a76a9cc
Contents?: true
Size: 740 Bytes
Versions: 11
Compression:
Stored size: 740 Bytes
Contents
require 'helper' class EnvironmentHelpersTest < Vault::TestCase include Vault::Test::EnvironmentHelpers def test_set_env_ovverides_env ENV['FOO_1'] = 'bar' set_env('FOO_1', 'baz') assert_equal('baz', ENV['FOO_1']) end def test_teardown_restores_env_to_original_value ENV['FOO_2'] = 'bar' set_env('FOO_2', 'baz') assert_equal('baz', ENV['FOO_2']) set_env('FOO_2', 'buzz') assert_equal('buzz', ENV['FOO_2']) teardown assert_equal('bar', ENV['FOO_2']) end def test_restores_empty_env_to_empty set_env('EMPTY', 'baz') assert_equal('baz', ENV['EMPTY']) set_env('EMPTY', 'buzz') assert_equal('buzz', ENV['EMPTY']) teardown assert_equal(nil, ENV['EMPTY']) end end
Version data entries
11 entries across 11 versions & 1 rubygems