summaryrefslogtreecommitdiff
path: root/spec/bundler/runtime
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-11 11:02:49 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-03 09:29:58 +0900
commita6ce001babc5728cd3c29df91ef29e0e57d4f012 (patch)
treea69a5b0778f7f22079b4aed9828a5971e6d6f169 /spec/bundler/runtime
parenta181df75429a3c3db2eef387f7476b18c3893615 (diff)
[bundler/bundler] Change the refresh spec to not use `stubs_for`
We plan to incrementally populate this array in rubygems, so that will break the test because the first time `find_by_name("rack")` is called will make the `rack` gem available in the array. We can test the same thing using some other way, which is more appropriate anyways, because `Bundler.rubygems.find_name` is only used inside `bundler` to look for the `bundler` gem itself whereas `Bundler.rubygems.all_specs` is used in more places. https://github.com/bundler/bundler/commit/49c519ef47
Diffstat (limited to 'spec/bundler/runtime')
-rw-r--r--spec/bundler/runtime/setup_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb
index 562085bbe4..995a269018 100644
--- a/spec/bundler/runtime/setup_spec.rb
+++ b/spec/bundler/runtime/setup_spec.rb
@@ -854,12 +854,12 @@ end
G
run <<-R
- puts Bundler.rubygems.find_name("rack").inspect
+ puts Bundler.rubygems.all_specs.map(&:name)
Gem.refresh
- puts Bundler.rubygems.find_name("rack").inspect
+ puts Bundler.rubygems.all_specs.map(&:name)
R
- expect(out).to eq("[]\n[]")
+ expect(out).to eq("activesupport\nbundler\nactivesupport\nbundler")
end
describe "when a vendored gem specification uses the :path option" do