summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2018-09-24 12:27:29 +0000
committerBundlerbot <bot@bundler.io>2018-09-24 12:27:29 +0000
commit5dc07bdeb6e5a665cf6bc797a1e6a1ddff17a524 (patch)
tree3ad0c37e609f19e687f4ee7aef61a7279dc35111
parent16ebc8105b333e055e44711df59e0d42e88963ce (diff)
parentd9ac14e876be949464311eac58c2f56aea0a8355 (diff)
downloadbundler-5dc07bdeb6e5a665cf6bc797a1e6a1ddff17a524.tar.gz
Merge #6706
6706: Clean up some specs r=colby-swandale a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that some specs could be more readable and clean. ### What was your diagnosis of the problem? My diagnosis was that some stuff could be more explicit, some TODO's could be removed because they're already fixed, and there should not be typos. ### What is your fix for the problem, implemented in this PR? My fix is to make the obvious changes to fix what I diagnosed. ### Why did you choose this fix out of the possible options? I chose this fix because it makes the specs clear, in my opinion. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
-rw-r--r--spec/runtime/setup_spec.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index d398a6ae8a..93a25b1ea8 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -827,7 +827,7 @@ end
it "should clean $LOAD_PATH properly" do
gem_name = "very_simple_binary"
full_gem_name = gem_name + "-1.0"
- ext_dir = File.join(tmp("extenstions", full_gem_name))
+ ext_dir = File.join(tmp("extensions", full_gem_name))
install_gem full_gem_name
@@ -1298,7 +1298,6 @@ end
end
let(:code) { strip_whitespace(<<-RUBY) }
- require "bundler/setup"
require "pp"
loaded_specs = Gem.loaded_specs.dup
#{exemptions.inspect}.each {|s| loaded_specs.delete(s) }
@@ -1313,22 +1312,18 @@ end
it "activates no gems with -rbundler/setup" do
install_gemfile! ""
- ruby! code, :env => { :RUBYOPT => activation_warning_hack_rubyopt }
+ ruby! code, :env => { :RUBYOPT => activation_warning_hack_rubyopt + " -rbundler/setup" }
expect(last_command.stdout).to eq("{}")
end
it "activates no gems with bundle exec" do
install_gemfile! ""
- # ensure we clean out the default gems, bceause bundler's allowed to be activated
create_file("script.rb", code)
- bundle! "exec ruby ./script.rb", :env => { :RUBYOPT => activation_warning_hack_rubyopt + " -rbundler/setup" }
+ bundle! "exec ruby ./script.rb", :env => { :RUBYOPT => activation_warning_hack_rubyopt }
expect(last_command.stdout).to eq("{}")
end
it "activates no gems with bundle exec that is loaded" do
- # TODO: remove once https://github.com/erikhuda/thor/pull/539 is released
- exemptions << "io-console"
-
install_gemfile! ""
create_file("script.rb", "#!/usr/bin/env ruby\n\n#{code}")
FileUtils.chmod(0o777, bundled_app("script.rb"))