summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-10-16 20:59:38 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-10-20 20:00:39 +0900
commit2519ba9faf0dda681545fe38c6be7979155007c8 (patch)
tree3229f421e85102366bd64eccb689ca09d582cb2a
parent5417b218c499db48b23de2bdc38ba2f33d3223c0 (diff)
downloadbundler-2519ba9faf0dda681545fe38c6be7979155007c8.tar.gz
Added ruby_core filtering condition with some examples.
The ruby core repository couldn't invoke its examples.
-rw-r--r--spec/commands/binstubs_spec.rb2
-rw-r--r--spec/commands/clean_spec.rb2
-rw-r--r--spec/commands/exec_spec.rb24
-rw-r--r--spec/commands/help_spec.rb16
-rw-r--r--spec/commands/info_spec.rb2
-rw-r--r--spec/commands/pristine_spec.rb4
-rw-r--r--spec/commands/show_spec.rb4
-rw-r--r--spec/install/deploy_spec.rb2
-rw-r--r--spec/install/gemfile/git_spec.rb6
-rw-r--r--spec/install/gems/compact_index_spec.rb2
-rw-r--r--spec/install/gems/dependency_api_spec.rb2
-rw-r--r--spec/install/gems/native_extensions_spec.rb2
-rw-r--r--spec/install/gems/resolving_spec.rb6
-rw-r--r--spec/install/gems/standalone_spec.rb2
-rw-r--r--spec/install/global_cache_spec.rb2
-rw-r--r--spec/install/path_spec.rb2
-rw-r--r--spec/other/bundle_ruby_spec.rb2
-rw-r--r--spec/quality_spec.rb16
-rw-r--r--spec/runtime/setup_spec.rb8
-rw-r--r--spec/runtime/with_clean_env_spec.rb8
-rw-r--r--spec/spec_helper.rb1
21 files changed, 58 insertions, 57 deletions
diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb
index ad859a21d5..09371572eb 100644
--- a/spec/commands/binstubs_spec.rb
+++ b/spec/commands/binstubs_spec.rb
@@ -192,7 +192,7 @@ RSpec.describe "bundle binstubs <gem>" do
end
end
- context "using another binstub" do
+ context "using another binstub", :ruby_repo do
let(:system_bundler_version) { :bundler }
it "loads all gems" do
sys_exec! bundled_app("bin/print_loaded_gems").to_s
diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb
index ff3317bb1d..00fa40f92e 100644
--- a/spec/commands/clean_spec.rb
+++ b/spec/commands/clean_spec.rb
@@ -712,7 +712,7 @@ RSpec.describe "bundle clean" do
should_not_have_gems "foo-1.0"
end
- it "doesn't remove extensions artifacts from bundled git gems after clean", :rubygems => "2.2" do
+ it "doesn't remove extensions artifacts from bundled git gems after clean", :ruby_repo, :rubygems => "2.2" do
build_git "very_simple_git_binary", &:add_c_extension
revision = revision_for(lib_path("very_simple_git_binary-1.0"))
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb
index acf12ced79..490bedacf0 100644
--- a/spec/commands/exec_spec.rb
+++ b/spec/commands/exec_spec.rb
@@ -33,7 +33,7 @@ RSpec.describe "bundle exec" do
expect(out).to eq("1.0.0")
end
- it "works when running from a random directory" do
+ it "works when running from a random directory", :ruby_repo do
install_gemfile <<-G
gem "rack"
G
@@ -178,7 +178,7 @@ RSpec.describe "bundle exec" do
expect(out).to have_rubyopts(rubyopt)
end
- it "does not duplicate already exec'ed RUBYLIB" do
+ it "does not duplicate already exec'ed RUBYLIB", :ruby_repo do
install_gemfile <<-G
gem "rack"
G
@@ -226,7 +226,7 @@ RSpec.describe "bundle exec" do
expect(out).to include("bundler: exec needs a command to run")
end
- it "raises a helpful error when exec'ing to something outside of the bundle", :rubygems => ">= 2.5.2" do
+ it "raises a helpful error when exec'ing to something outside of the bundle", :ruby_repo, :rubygems => ">= 2.5.2" do
bundle! "config clean false" # want to keep the rackup binstub
install_gemfile! <<-G
source "file://#{gem_repo1}"
@@ -303,35 +303,35 @@ RSpec.describe "bundle exec" do
expect(out).to eq('args: ["-h"]')
end
- it "shows bundle-exec's man page when --help is between exec and the executable" do
+ it "shows bundle-exec's man page when --help is between exec and the executable", :ruby_repo do
with_fake_man do
bundle "#{exec} --help cat"
end
expect(out).to include(%(["#{root}/man/bundle-exec.1"]))
end
- it "shows bundle-exec's man page when --help is before exec" do
+ it "shows bundle-exec's man page when --help is before exec", :ruby_repo do
with_fake_man do
bundle "--help #{exec}"
end
expect(out).to include(%(["#{root}/man/bundle-exec.1"]))
end
- it "shows bundle-exec's man page when -h is before exec" do
+ it "shows bundle-exec's man page when -h is before exec", :ruby_repo do
with_fake_man do
bundle "-h #{exec}"
end
expect(out).to include(%(["#{root}/man/bundle-exec.1"]))
end
- it "shows bundle-exec's man page when --help is after exec" do
+ it "shows bundle-exec's man page when --help is after exec", :ruby_repo do
with_fake_man do
bundle "#{exec} --help"
end
expect(out).to include(%(["#{root}/man/bundle-exec.1"]))
end
- it "shows bundle-exec's man page when -h is after exec" do
+ it "shows bundle-exec's man page when -h is after exec", :ruby_repo do
with_fake_man do
bundle "#{exec} -h"
end
@@ -349,13 +349,13 @@ RSpec.describe "bundle exec" do
G
end
- it "works when unlocked" do
+ it "works when unlocked", :ruby_repo do
bundle "exec 'cd #{tmp("gems")} && rackup'", :env => { :RUBYOPT => "-r#{spec_dir.join("support/hax")}" }
expect(out).to eq("1.0.0")
expect(out).to include("1.0.0")
end
- it "works when locked" do
+ it "works when locked", :ruby_repo do
expect(the_bundle).to be_locked
bundle "exec 'cd #{tmp("gems")} && rackup'", :env => { :RUBYOPT => "-r#{spec_dir.join("support/hax")}" }
expect(out).to include("1.0.0")
@@ -633,7 +633,7 @@ RSpec.describe "bundle exec" do
it_behaves_like "it runs"
end
- context "when the file uses the current ruby shebang" do
+ context "when the file uses the current ruby shebang", :ruby_repo do
let(:shebang) { "#!#{Gem.ruby}" }
it_behaves_like "it runs"
end
@@ -785,7 +785,7 @@ __FILE__: #{path.to_s.inspect}
end
end
- context "nested bundle exec" do
+ context "nested bundle exec", :ruby_repo do
let(:system_gems_to_install) { super() << :bundler }
context "with shared gems disabled" do
diff --git a/spec/commands/help_spec.rb b/spec/commands/help_spec.rb
index 56b1b6f722..cd6f13756c 100644
--- a/spec/commands/help_spec.rb
+++ b/spec/commands/help_spec.rb
@@ -10,21 +10,21 @@ RSpec.describe "bundle help" do
expect(err).to include("running `gem cleanup bundler`.")
end
- it "uses mann when available" do
+ it "uses mann when available", :ruby_repo do
with_fake_man do
bundle "help gemfile"
end
expect(out).to eq(%(["#{root}/man/gemfile.5"]))
end
- it "prefixes bundle commands with bundle- when finding the groff files" do
+ it "prefixes bundle commands with bundle- when finding the groff files", :ruby_repo do
with_fake_man do
bundle "help install"
end
expect(out).to eq(%(["#{root}/man/bundle-install.1"]))
end
- it "simply outputs the txt file when there is no man on the path" do
+ it "simply outputs the txt file when there is no man on the path", :ruby_repo do
with_path_as("") do
bundle "help install"
end
@@ -49,28 +49,28 @@ RSpec.describe "bundle help" do
expect(out).to eq("--help")
end
- it "is called when the --help flag is used after the command" do
+ it "is called when the --help flag is used after the command", :ruby_repo do
with_fake_man do
bundle "install --help"
end
expect(out).to eq(%(["#{root}/man/bundle-install.1"]))
end
- it "is called when the --help flag is used before the command" do
+ it "is called when the --help flag is used before the command", :ruby_repo do
with_fake_man do
bundle "--help install"
end
expect(out).to eq(%(["#{root}/man/bundle-install.1"]))
end
- it "is called when the -h flag is used before the command" do
+ it "is called when the -h flag is used before the command", :ruby_repo do
with_fake_man do
bundle "-h install"
end
expect(out).to eq(%(["#{root}/man/bundle-install.1"]))
end
- it "is called when the -h flag is used after the command" do
+ it "is called when the -h flag is used after the command", :ruby_repo do
with_fake_man do
bundle "install -h"
end
@@ -84,7 +84,7 @@ RSpec.describe "bundle help" do
expect(out).to include('Could not find command "instill".')
end
- it "is called when only using the --help flag" do
+ it "is called when only using the --help flag", :ruby_repo do
with_fake_man do
bundle "--help"
end
diff --git a/spec/commands/info_spec.rb b/spec/commands/info_spec.rb
index a08965ec0e..a9ab8fc210 100644
--- a/spec/commands/info_spec.rb
+++ b/spec/commands/info_spec.rb
@@ -24,7 +24,7 @@ RSpec.describe "bundle info" do
end
end
- context "given a default gem shippped in ruby" do
+ context "given a default gem shippped in ruby", :ruby_repo do
it "prints information about the default gem", :if => (RUBY_VERSION >= "2.0") do
bundle "info rdoc"
expect(out).to include("* rdoc")
diff --git a/spec/commands/pristine_spec.rb b/spec/commands/pristine_spec.rb
index de3cb8054b..da6bb1c093 100644
--- a/spec/commands/pristine_spec.rb
+++ b/spec/commands/pristine_spec.rb
@@ -2,7 +2,7 @@
require "bundler/vendored_fileutils"
-RSpec.describe "bundle pristine" do
+RSpec.describe "bundle pristine", :ruby_repo do
before :each do
build_lib "baz", :path => bundled_app do |s|
s.version = "1.0.0"
@@ -42,7 +42,7 @@ RSpec.describe "bundle pristine" do
expect(changes_txt).to_not be_file
end
- it "does not delete the bundler gem" do
+ it "does not delete the bundler gem", :ruby_repo do
ENV["BUNDLER_SPEC_KEEP_DEFAULT_BUNDLER_GEM"] = "true"
system_gems :bundler
bundle! "install"
diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb
index 102b9534de..369d0d708a 100644
--- a/spec/commands/show_spec.rb
+++ b/spec/commands/show_spec.rb
@@ -60,12 +60,12 @@ RSpec.describe "bundle show" do
and include(default_bundle_path("gems", "rails-2.3.2").to_s)
end
- it "prints the path to the running bundler", :bundler => "< 2" do
+ it "prints the path to the running bundler", :ruby_repo, :bundler => "< 2" do
bundle "show bundler"
expect(out).to eq(root.to_s)
end
- it "prints the path to the running bundler", :bundler => "2" do
+ it "prints the path to the running bundler", :ruby_repo, :bundler => "2" do
bundle "show bundler"
expect(out).to eq(
"[DEPRECATED FOR 2.0] use `bundle info bundler` instead of `bundle show bundler`\n" +
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb
index 491801e27a..3b9d68982a 100644
--- a/spec/install/deploy_spec.rb
+++ b/spec/install/deploy_spec.rb
@@ -64,7 +64,7 @@ RSpec.describe "install with --deployment or --frozen" do
bundle! :install, forgotten_command_line_options(:deployment => true, :without => "test")
end
- it "works when you bundle exec bundle" do
+ it "works when you bundle exec bundle", :ruby_repo do
bundle :install
bundle "install --deployment"
bundle! "exec bundle check"
diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb
index 651deb3265..ab9fdd9f86 100644
--- a/spec/install/gemfile/git_spec.rb
+++ b/spec/install/gemfile/git_spec.rb
@@ -1099,7 +1099,7 @@ RSpec.describe "bundle install with git sources" do
end
context "with an extension" do
- it "installs the extension" do
+ it "installs the extension", :ruby_repo do
build_git "foo" do |s|
s.add_dependency "rake"
s.extensions << "Rakefile"
@@ -1131,7 +1131,7 @@ RSpec.describe "bundle install with git sources" do
expect(out).to eq(Pathname.glob(default_bundle_path("bundler/gems/extensions/**/foo-1.0-*")).first.to_s)
end
- it "does not use old extension after ref changes" do
+ it "does not use old extension after ref changes", :ruby_repo do
git_reader = build_git "foo", :no_default => true do |s|
s.extensions = ["ext/extconf.rb"]
s.write "ext/extconf.rb", <<-RUBY
@@ -1193,7 +1193,7 @@ In Gemfile:
expect(out).not_to include("gem install foo")
end
- it "does not reinstall the extension", :rubygems => ">= 2.3.0" do
+ it "does not reinstall the extension", :ruby_repo, :rubygems => ">= 2.3.0" do
build_git "foo" do |s|
s.add_dependency "rake"
s.extensions << "Rakefile"
diff --git a/spec/install/gems/compact_index_spec.rb b/spec/install/gems/compact_index_spec.rb
index 02a37a77d5..b06b72ecfa 100644
--- a/spec/install/gems/compact_index_spec.rb
+++ b/spec/install/gems/compact_index_spec.rb
@@ -717,7 +717,7 @@ The checksum of /versions does not match the checksum provided by the server! So
end
end
- context "when ruby is compiled without openssl" do
+ context "when ruby is compiled without openssl", :ruby_repo do
before do
# Install a monkeypatch that reproduces the effects of openssl being
# missing when the fetcher runs, as happens in real life. The reason
diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb
index 2ffe4b62d7..fe696f38c3 100644
--- a/spec/install/gems/dependency_api_spec.rb
+++ b/spec/install/gems/dependency_api_spec.rb
@@ -691,7 +691,7 @@ RSpec.describe "gemcutter's dependency API" do
end
end
- context "when ruby is compiled without openssl" do
+ context "when ruby is compiled without openssl", :ruby_repo do
before do
# Install a monkeypatch that reproduces the effects of openssl being
# missing when the fetcher runs, as happens in real life. The reason
diff --git a/spec/install/gems/native_extensions_spec.rb b/spec/install/gems/native_extensions_spec.rb
index c8252b81f1..ea616f60d3 100644
--- a/spec/install/gems/native_extensions_spec.rb
+++ b/spec/install/gems/native_extensions_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "installing a gem with native extensions" do
+RSpec.describe "installing a gem with native extensions", :ruby_repo do
it "installs" do
build_repo2 do
build_gem "c_extension" do |s|
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb
index f581522c71..ddf803ed7d 100644
--- a/spec/install/gems/resolving_spec.rb
+++ b/spec/install/gems/resolving_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
RSpec.describe "bundle install with install-time dependencies" do
- it "installs gems with implicit rake dependencies" do
+ it "installs gems with implicit rake dependencies", :ruby_repo do
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "with_implicit_rake_dep"
@@ -48,7 +48,7 @@ RSpec.describe "bundle install with install-time dependencies" do
expect(the_bundle).to include_gems "net_b 1.0"
end
- it "installs plugins depended on by other plugins" do
+ it "installs plugins depended on by other plugins", :ruby_repo do
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "net_a"
@@ -57,7 +57,7 @@ RSpec.describe "bundle install with install-time dependencies" do
expect(the_bundle).to include_gems "net_a 1.0", "net_b 1.0"
end
- it "installs multiple levels of dependencies" do
+ it "installs multiple levels of dependencies", :ruby_repo do
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "net_c"
diff --git a/spec/install/gems/standalone_spec.rb b/spec/install/gems/standalone_spec.rb
index b149d9d00b..10ce589eef 100644
--- a/spec/install/gems/standalone_spec.rb
+++ b/spec/install/gems/standalone_spec.rb
@@ -67,7 +67,7 @@ RSpec.shared_examples "bundle install --standalone" do
include_examples "common functionality"
end
- describe "with gems with native extension" do
+ describe "with gems with native extension", :ruby_repo do
before do
install_gemfile <<-G, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true)
source "file://#{gem_repo1}"
diff --git a/spec/install/global_cache_spec.rb b/spec/install/global_cache_spec.rb
index 3664d3963a..e41e7e0157 100644
--- a/spec/install/global_cache_spec.rb
+++ b/spec/install/global_cache_spec.rb
@@ -187,7 +187,7 @@ RSpec.describe "global gem caching" do
end
end
- describe "extension caching", :rubygems => "2.2" do
+ describe "extension caching", :ruby_repo, :rubygems => "2.2" do
it "works" do
build_git "very_simple_git_binary", &:add_c_extension
build_lib "very_simple_path_binary", &:add_c_extension
diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb
index 5f3fedb862..44439c275e 100644
--- a/spec/install/path_spec.rb
+++ b/spec/install/path_spec.rb
@@ -207,7 +207,7 @@ RSpec.describe "bundle install" do
expect(the_bundle).to include_gems "rack 1.0.0"
end
- it "re-installs gems whose extensions have been deleted", :rubygems => ">= 2.3" do
+ it "re-installs gems whose extensions have been deleted", :ruby_repo, :rubygems => ">= 2.3" do
build_lib "very_simple_binary", "1.0.0", :to_system => true do |s|
s.write "lib/very_simple_binary.rb", "raise 'FAIL'"
end
diff --git a/spec/other/bundle_ruby_spec.rb b/spec/other/bundle_ruby_spec.rb
index a7da9cbec9..8e365a489c 100644
--- a/spec/other/bundle_ruby_spec.rb
+++ b/spec/other/bundle_ruby_spec.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.describe "bundle_ruby", :bundler => "< 2" do
+RSpec.describe "bundle_ruby", :ruby_repo, :bundler => "< 2" do
context "without patchlevel" do
it "returns the ruby version" do
gemfile <<-G
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
index f8aec009ef..84da4aaeb9 100644
--- a/spec/quality_spec.rb
+++ b/spec/quality_spec.rb
@@ -104,7 +104,7 @@ RSpec.describe "The library itself" do
end
end
- it "has no malformed whitespace" do
+ it "has no malformed whitespace", :ruby_repo do
exempt = /\.gitmodules|\.marshal|fixtures|vendor|ssl_certs|LICENSE|vcr_cassettes/
error_messages = []
Dir.chdir(root) do
@@ -117,7 +117,7 @@ RSpec.describe "The library itself" do
expect(error_messages.compact).to be_well_formed
end
- it "does not include any leftover debugging or development mechanisms" do
+ it "does not include any leftover debugging or development mechanisms", :ruby_repo do
exempt = %r{quality_spec.rb|support/helpers|vcr_cassettes|\.md|\.ronn}
error_messages = []
Dir.chdir(root) do
@@ -129,7 +129,7 @@ RSpec.describe "The library itself" do
expect(error_messages.compact).to be_well_formed
end
- it "does not include any unresolved merge conflicts" do
+ it "does not include any unresolved merge conflicts", :ruby_repo do
error_messages = []
exempt = %r{lock/lockfile_(bundler_1_)?spec|quality_spec|vcr_cassettes|\.ronn|lockfile_parser\.rb}
Dir.chdir(root) do
@@ -141,7 +141,7 @@ RSpec.describe "The library itself" do
expect(error_messages.compact).to be_well_formed
end
- it "maintains language quality of the documentation" do
+ it "maintains language quality of the documentation", :ruby_repo do
included = /ronn/
error_messages = []
Dir.chdir(root) do
@@ -154,7 +154,7 @@ RSpec.describe "The library itself" do
expect(error_messages.compact).to be_well_formed
end
- it "maintains language quality of sentences used in source code" do
+ it "maintains language quality of sentences used in source code", :ruby_repo do
error_messages = []
exempt = /vendor/
Dir.chdir(root) do
@@ -167,7 +167,7 @@ RSpec.describe "The library itself" do
expect(error_messages.compact).to be_well_formed
end
- it "documents all used settings" do
+ it "documents all used settings", :ruby_repo do
exemptions = %w[
auto_config_jobs
cache_command_is_package
@@ -216,7 +216,7 @@ RSpec.describe "The library itself" do
expect(documented_settings).to be_sorted
end
- it "can still be built" do
+ it "can still be built", :ruby_repo do
Dir.chdir(root) do
begin
gem_command! :build, "bundler.gemspec"
@@ -235,7 +235,7 @@ RSpec.describe "The library itself" do
end
end
- it "does not contain any warnings" do
+ it "does not contain any warnings", :ruby_repo do
Dir.chdir(root) do
exclusions = %w[
lib/bundler/capistrano.rb
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 93a25b1ea8..376053a625 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -119,7 +119,7 @@ RSpec.describe "Bundler.setup" do
lp.map! {|p| p.sub(/^#{Regexp.union system_gem_path.to_s, default_bundle_path.to_s}/i, "") }
end
- it "puts loaded gems after -I and RUBYLIB" do
+ it "puts loaded gems after -I and RUBYLIB", :ruby_repo do
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "rack"
@@ -144,7 +144,7 @@ RSpec.describe "Bundler.setup" do
expect(rack_load_order).to be > 0
end
- it "orders the load path correctly when there are dependencies" do
+ it "orders the load path correctly when there are dependencies", :ruby_repo do
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "rails"
@@ -824,7 +824,7 @@ end
expect(out).to eq("yay")
end
- it "should clean $LOAD_PATH properly" do
+ it "should clean $LOAD_PATH properly", :ruby_repo do
gem_name = "very_simple_binary"
full_gem_name = gem_name + "-1.0"
ext_dir = File.join(tmp("extensions", full_gem_name))
@@ -1265,7 +1265,7 @@ end
expect(out).to eq("undefined\nconstant")
end
- describe "default gem activation" do
+ describe "default gem activation", :ruby_repo do
let(:exemptions) do
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new("2.7") || ENV["RGV"] == "master"
[]
diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb
index fd621071ad..c88da3cd02 100644
--- a/spec/runtime/with_clean_env_spec.rb
+++ b/spec/runtime/with_clean_env_spec.rb
@@ -16,7 +16,7 @@ RSpec.describe "Bundler.with_env helpers" do
bundle "install"
end
- it "should return the PATH present before bundle was activated" do
+ it "should return the PATH present before bundle was activated", :ruby_repo do
code = "print Bundler.original_env['PATH']"
path = `getconf PATH`.strip + "#{File::PATH_SEPARATOR}/foo"
with_path_as(path) do
@@ -34,7 +34,7 @@ RSpec.describe "Bundler.with_env helpers" do
end
end
- it "works with nested bundle exec invocations" do
+ it "works with nested bundle exec invocations", :ruby_repo do
create_file("exe.rb", <<-'RB')
count = ARGV.first.to_i
exit if count < 0
@@ -55,7 +55,7 @@ RSpec.describe "Bundler.with_env helpers" do
EOS
end
- it "removes variables that bundler added" do
+ it "removes variables that bundler added", :ruby_repo do
original = ruby!('puts ENV.to_a.map {|e| e.join("=") }.sort.join("\n")', :env => { :RUBYOPT => "-r#{spec_dir.join("support/hax")}" })
code = 'puts Bundler.original_env.to_a.map {|e| e.join("=") }.sort.join("\n")'
bundle! "exec '#{Gem.ruby}' -e #{code.dump}", :env => { :RUBYOPT => "-r#{spec_dir.join("support/hax")}" }
@@ -84,7 +84,7 @@ RSpec.describe "Bundler.with_env helpers" do
expect(last_command.stdboth).not_to include("-rbundler/setup")
end
- it "should clean up RUBYLIB" do
+ it "should clean up RUBYLIB", :ruby_repo do
code = "print Bundler.clean_env['RUBYLIB']"
ENV["RUBYLIB"] = root.join("lib").to_s + File::PATH_SEPARATOR + "/foo"
bundle_exec_ruby! code.dump
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index f39a4509a2..45a3bcbf89 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -99,6 +99,7 @@ RSpec.configure do |config|
config.filter_run_excluding :git => LessThanProc.with(git_version)
config.filter_run_excluding :rubygems_master => (ENV["RGV"] != "master")
config.filter_run_excluding :bundler => LessThanProc.with(Bundler::VERSION.split(".")[0, 2].join("."))
+ config.filter_run_excluding :ruby_repo => !!(ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"])
config.filter_run_when_matching :focus unless ENV["CI"]