diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-11 11:02:49 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-11 11:02:49 +0200 |
commit | 49c519ef47edf17b79a10d9a87cad170d4dd34fc (patch) | |
tree | 29ec50d77d29d18b7a6bf3fef42bf33ad431fd68 | |
parent | 3810f9945ce17c180e8375af46eb75059d68de91 (diff) | |
download | bundler-49c519ef47edf17b79a10d9a87cad170d4dd34fc.tar.gz |
Change the refresh spec to not use `stubs_for`no_need_to_make_gem_refresh_a_noop
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.
-rw-r--r-- | spec/runtime/setup_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index 562085bbe4..995a269018 100644 --- a/spec/runtime/setup_spec.rb +++ b/spec/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 |