mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00

When launching bundler subprocesses for end to end testing, all of them
will load the `spec/support/rubygems_version_manager.rb` file passed as
a ruby's `-r` flag.
Unfortunately this file depends on `pathname`, so unless we drop that
dependency, we can't really test support for including the `pathname`
gem in the `Gemfile`.
This commit implements some refactorings to avoid loading `pathname`
inside `bundler` test subprocesses.
c1f948788c
15 lines
327 B
Ruby
15 lines
327 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Spec
|
|
module Options
|
|
def opt_add(option, options)
|
|
[option.strip, options].compact.reject(&:empty?).join(" ")
|
|
end
|
|
|
|
def opt_remove(option, options)
|
|
return unless options
|
|
|
|
options.split(" ").reject {|opt| opt.strip == option.strip }.join(" ")
|
|
end
|
|
end
|
|
end
|