diff --git a/Gemfile b/Gemfile index 50e67e4a..691bcdd0 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,7 @@ source 'https://rubygems.org' group :development do # gem 'debug' gem 'completely' + gem 'ice_age' gem 'rspec' gem 'rspec_approvals' gem 'runfile', require: false diff --git a/spec/bashly/commands/shell_spec.rb b/spec/bashly/commands/shell_spec.rb index feee4a93..6d66cf37 100644 --- a/spec/bashly/commands/shell_spec.rb +++ b/spec/bashly/commands/shell_spec.rb @@ -19,7 +19,6 @@ describe 'in-terminal commands' do before do - ENV['BASHLY_SHELL'] = nil allow(Reline).to receive(:readline).and_return(*input) end diff --git a/spec/bashly/integration/examples_spec.rb b/spec/bashly/integration/examples_spec.rb index e5fe4201..f89fe9fe 100644 --- a/spec/bashly/integration/examples_spec.rb +++ b/spec/bashly/integration/examples_spec.rb @@ -8,7 +8,6 @@ describe 'generated bash scripts', :slow do # Make sure all examples are generated with strict mode before { ENV['BASHLY_STRICT'] = 'yes' } - after { ENV['BASHLY_STRICT'] = nil } # Test public examples from the examples folder... examples = Dir['examples/*'].select { |f| File.directory?(f) } diff --git a/spec/bashly/settings_spec.rb b/spec/bashly/settings_spec.rb index dcda46c3..9029bc3a 100644 --- a/spec/bashly/settings_spec.rb +++ b/spec/bashly/settings_spec.rb @@ -42,18 +42,13 @@ subject.source_dir = nil end - after { ENV['BASHLY_SETTINGS_PATH'] = nil } - it 'returns the value from the settings file' do expect(subject.source_dir).to eq 'from-var' end end context 'when its corresponding env var is set' do - let(:original_value) { ENV['BASHLY_TAB_INDENT'] } - before { described_class.tab_indent = nil } - after { ENV['BASHLY_TAB_INDENT'] = original_value } it 'returns true when the env var is truthy' do %w[1 true yes].each do |value| @@ -112,7 +107,6 @@ describe '::extra_lib_dirs' do context 'when set using env var as a comma delimited string' do before { ENV['BASHLY_EXTRA_LIB_DIRS'] = 'one,two' } - after { ENV['BASHLY_EXTRA_LIB_DIRS'] = nil } it 'converts comma delimited string to an array' do expect(subject.extra_lib_dirs).to match_array %w[one two] @@ -168,13 +162,10 @@ end it 'accepts the setting from the environment' do - original_value = ENV['BASHLY_COMPLETIONS'] ENV['BASHLY_COMPLETIONS'] = 'zsh,bash' subject.completions = nil expect(subject.completion_shells).to eq %w[zsh bash] - ensure - ENV['BASHLY_COMPLETIONS'] = original_value end it 'rejects invalid values' do