summaryrefslogtreecommitdiff
path: root/spec/bundler/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/runtime')
-rw-r--r--spec/bundler/runtime/env_helpers_spec.rb8
-rw-r--r--spec/bundler/runtime/executable_spec.rb4
-rw-r--r--spec/bundler/runtime/self_management_spec.rb4
-rw-r--r--spec/bundler/runtime/setup_spec.rb5
4 files changed, 11 insertions, 10 deletions
diff --git a/spec/bundler/runtime/env_helpers_spec.rb b/spec/bundler/runtime/env_helpers_spec.rb
index ce74ba8c19..9280a43334 100644
--- a/spec/bundler/runtime/env_helpers_spec.rb
+++ b/spec/bundler/runtime/env_helpers_spec.rb
@@ -139,7 +139,7 @@ RSpec.describe "env helpers" do
it_behaves_like "an unbundling helper"
end
- describe "Bundler.clean_env", bundler: 2 do
+ describe "Bundler.clean_env", bundler: "2" do
let(:modified_env) { "Bundler.clean_env" }
it_behaves_like "an unbundling helper"
@@ -161,7 +161,7 @@ RSpec.describe "env helpers" do
end
end
- describe "Bundler.with_clean_env", bundler: 2 do
+ describe "Bundler.with_clean_env", bundler: "2" do
it "should set ENV to unbundled_env in the block" do
expected = Bundler.unbundled_env
@@ -212,7 +212,7 @@ RSpec.describe "env helpers" do
end
end
- describe "Bundler.clean_system", bundler: 2 do
+ describe "Bundler.clean_system", bundler: "2" do
before do
create_file("source.rb", <<-'RUBY')
Bundler.ui.silence { Bundler.clean_system("ruby", "-e", "exit(42) unless ENV['BUNDLE_FOO'] == 'bar'") }
@@ -263,7 +263,7 @@ RSpec.describe "env helpers" do
end
end
- describe "Bundler.clean_exec", bundler: 2 do
+ describe "Bundler.clean_exec", bundler: "2" do
before do
create_file("source.rb", <<-'RUBY')
Process.fork do
diff --git a/spec/bundler/runtime/executable_spec.rb b/spec/bundler/runtime/executable_spec.rb
index a4226ed51e..6f7bb524f2 100644
--- a/spec/bundler/runtime/executable_spec.rb
+++ b/spec/bundler/runtime/executable_spec.rb
@@ -96,7 +96,7 @@ RSpec.describe "Running bin/* commands" do
expect(bundled_app("bin/myrackup")).not_to exist
end
- it "allows you to stop installing binstubs", bundler: "< 3" do
+ it "allows you to stop installing binstubs", bundler: "2" do
skip "delete permission error" if Gem.win_platform?
bundle "install --binstubs bin/"
@@ -109,7 +109,7 @@ RSpec.describe "Running bin/* commands" do
expect(out).to include("You have not configured a value for `bin`")
end
- it "remembers that the option was specified", bundler: "< 3" do
+ it "remembers that the option was specified", bundler: "2" do
gemfile <<-G
source "https://gem.repo1"
gem "activesupport"
diff --git a/spec/bundler/runtime/self_management_spec.rb b/spec/bundler/runtime/self_management_spec.rb
index a481ae3a4d..4b2ac2afc3 100644
--- a/spec/bundler/runtime/self_management_spec.rb
+++ b/spec/bundler/runtime/self_management_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe "Self management" do
"9.4.0"
end
- before do
+ around do |example|
build_repo4 do
build_bundler previous_minor
@@ -26,6 +26,8 @@ RSpec.describe "Self management" do
G
pristine_system_gems "bundler-#{current_version}"
+
+ with_env_vars("BUNDLER_4_MODE" => nil, &example)
end
it "installs locked version when using system path and uses it" do
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb
index e47e64de29..cbb31f7350 100644
--- a/spec/bundler/runtime/setup_spec.rb
+++ b/spec/bundler/runtime/setup_spec.rb
@@ -1406,7 +1406,6 @@ end
describe "default gem activation" do
let(:exemptions) do
exempts = %w[did_you_mean bundler uri pathname]
- exempts << "etc" if (Gem.ruby_version < Gem::Version.new("3.2") || Gem.ruby_version >= Gem::Version.new("3.3.2")) && Gem.win_platform?
exempts << "error_highlight" # added in Ruby 3.1 as a default gem
exempts << "ruby2_keywords" # added in Ruby 3.1 as a default gem
exempts << "syntax_suggest" # added in Ruby 3.2 as a default gem
@@ -1525,7 +1524,7 @@ end
end
describe "after setup" do
- it "allows calling #gem on random objects", bundler: "< 3" do
+ it "allows calling #gem on random objects", bundler: "2" do
install_gemfile <<-G
source "https://gem.repo1"
gem "myrack"
@@ -1540,7 +1539,7 @@ end
expect(out).to eq("myrack-1.0.0")
end
- it "keeps Kernel#gem private", bundler: "3" do
+ it "keeps Kernel#gem private", bundler: "4" do
install_gemfile <<-G
source "https://gem.repo1"
gem "myrack"