Sha256: f9d1e892f69079b158c0baceca01694d33013492361830a8f2bafcd908d7f5e2
Contents?: true
Size: 1.03 KB
Versions: 83
Compression:
Stored size: 1.03 KB
Contents
# frozen_string_literal: true require 'eac_ruby_utils/ruby' RSpec.describe ::EacRubyUtils::Ruby do describe '#on_clean_environment' do let(:envvar_name) { 'BUNDLE_NOT_EXISTENT_ENV_VAR' } let(:envvar_value) { 'any value' } let(:noruby_envvar_name) { 'ANY_ENVIRONMENT_VARIABLE' } let(:noruby_envvar_value) { 'another any value' } before do ENV[envvar_name] = envvar_value ENV[noruby_envvar_name] = noruby_envvar_value end it do # rubocop:disable RSpec/MultipleExpectations expect(ENV[envvar_name]).to eq(envvar_value) described_class.on_clean_environment do expect(ENV[envvar_name]).to eq(nil) end expect(ENV[envvar_name]).to eq(envvar_value) end it do # rubocop:disable RSpec/MultipleExpectations expect(ENV[noruby_envvar_name]).to eq(noruby_envvar_value) described_class.on_clean_environment do expect(ENV[noruby_envvar_name]).to eq(noruby_envvar_value) end expect(ENV[noruby_envvar_name]).to eq(noruby_envvar_value) end end end
Version data entries
83 entries across 83 versions & 1 rubygems