Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion spec/bashly/commands/shell_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

describe 'in-terminal commands' do
before do
ENV['BASHLY_SHELL'] = nil
allow(Reline).to receive(:readline).and_return(*input)
end

Expand Down
1 change: 0 additions & 1 deletion spec/bashly/integration/examples_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down
9 changes: 0 additions & 9 deletions spec/bashly/settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down