Skip to content

Commit

Permalink
Merge pull request #3995 from rubygems/improve_spec_independance
Browse files Browse the repository at this point in the history
Improve the independence of bundler specs from rubygems
  • Loading branch information
deivid-rodriguez committed Oct 6, 2020
2 parents af12668 + 3009b76 commit d0794df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bundler/spec/commands/clean_spec.rb
Expand Up @@ -625,9 +625,11 @@ def should_not_have_gems(*gems)
expect(out).to eq("1.0")
end

it "when using --force, it doesn't remove default gem binaries", :rubygems => ">= 3.2.0.rc.1" do
it "when using --force, it doesn't remove default gem binaries" do
skip "does not work on ruby 3.0 because it changes the path to look for default gems, tsort is a default gem there, and we can't install it either like we do with fiddle because it doesn't yet exist" unless RUBY_VERSION < "3.0.0"

skip "does not work on rubygems versions where `--install_dir` doesn't respect --default" unless Gem::Installer.for_spec(loaded_gemspec, :install_dir => "/foo").default_spec_file == "/foo/specifications/default/bundler-#{Bundler::VERSION}.gemspec" # Since rubygems 3.2.0.rc.2

default_irb_version = ruby "gem 'irb', '< 999999'; require 'irb'; puts IRB::VERSION", :raise_on_error => false
skip "irb isn't a default gem" if default_irb_version.empty?

Expand Down
1 change: 0 additions & 1 deletion bundler/spec/support/filters.rb
Expand Up @@ -26,7 +26,6 @@ def inspect

git_version = Bundler::Source::Git::GitProxy.new(nil, nil, nil).version

config.filter_run_excluding :rubygems => RequirementChecker.against(Gem::VERSION)
config.filter_run_excluding :git => RequirementChecker.against(git_version)
config.filter_run_excluding :bundler => RequirementChecker.against(Bundler::VERSION.split(".")[0])
config.filter_run_excluding :ruby_repo => !ENV["GEM_COMMAND"].nil?
Expand Down

0 comments on commit d0794df

Please sign in to comment.