summaryrefslogtreecommitdiff
path: root/spec/runtime
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-04 22:23:44 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-11 13:25:59 +0200
commitb9baa34673b96419410bd7c61d379bc8c89d798e (patch)
treeacd392e65c87618a82afbd9d6051de4dddc6e387 /spec/runtime
parent4e96e9b7b921a2792f14e9127c7d9a0838832e57 (diff)
downloadbundler-b9baa34673b96419410bd7c61d379bc8c89d798e.tar.gz
Move on to bundler 3
* Drop bundler 1 stuff from tests. * Move all feature flags to bundler 3 (like they are in 2-0-stable) and get them tested.
Diffstat (limited to 'spec/runtime')
-rw-r--r--spec/runtime/executable_spec.rb21
-rw-r--r--spec/runtime/setup_spec.rb4
-rw-r--r--spec/runtime/with_unbundled_env_spec.rb8
3 files changed, 8 insertions, 25 deletions
diff --git a/spec/runtime/executable_spec.rb b/spec/runtime/executable_spec.rb
index dcee234e15..b2d5b6c03f 100644
--- a/spec/runtime/executable_spec.rb
+++ b/spec/runtime/executable_spec.rb
@@ -99,7 +99,7 @@ RSpec.describe "Running bin/* commands" do
expect(bundled_app("bin/rackup")).not_to exist
end
- it "allows you to stop installing binstubs", :bundler => "< 2" do
+ it "allows you to stop installing binstubs", :bundler => "< 3" do
bundle! "install --binstubs bin/"
bundled_app("bin/rackup").rmtree
bundle! "install --binstubs \"\""
@@ -110,7 +110,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 => "< 2" do
+ it "remembers that the option was specified", :bundler => "< 3" do
gemfile <<-G
source "file://#{gem_repo1}"
gem "activesupport"
@@ -129,23 +129,6 @@ RSpec.describe "Running bin/* commands" do
expect(bundled_app("bin/rackup")).to exist
end
- it "rewrites bins on --binstubs (to maintain backwards compatibility)", :bundler => "< 2" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- G
-
- bundle! :install, forgotten_command_line_options([:binstubs, :bin] => "bin")
-
- File.open(bundled_app("bin/rackup"), "wb") do |file|
- file.print "OMG"
- end
-
- bundle "install"
-
- expect(bundled_app("bin/rackup").read).to_not eq("OMG")
- end
-
it "rewrites bins on binstubs (to maintain backwards compatibility)" do
install_gemfile! <<-G
source "file://#{gem_repo1}"
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index ac8170d2e1..c81baa34ea 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -1327,7 +1327,7 @@ end
end
describe "after setup" do
- it "allows calling #gem on random objects", :bundler => "< 2" do
+ it "allows calling #gem on random objects", :bundler => "< 3" do
install_gemfile <<-G
source "file:#{gem_repo1}"
gem "rack"
@@ -1342,7 +1342,7 @@ end
expect(out).to eq("rack-1.0.0")
end
- it "keeps Kernel#gem private", :bundler => "2" do
+ it "keeps Kernel#gem private", :bundler => "3" do
install_gemfile! <<-G
source "file:#{gem_repo1}"
gem "rack"
diff --git a/spec/runtime/with_unbundled_env_spec.rb b/spec/runtime/with_unbundled_env_spec.rb
index 24a08992b2..b4503cba32 100644
--- a/spec/runtime/with_unbundled_env_spec.rb
+++ b/spec/runtime/with_unbundled_env_spec.rb
@@ -98,7 +98,7 @@ RSpec.describe "Bundler.with_env helpers" do
it_behaves_like "an unbundling helper"
end
- describe "Bundler.clean_env" do
+ describe "Bundler.clean_env", :bundler => 2 do
let(:modified_env) { "Bundler.clean_env" }
it_behaves_like "an unbundling helper"
@@ -120,7 +120,7 @@ RSpec.describe "Bundler.with_env helpers" do
end
end
- describe "Bundler.with_clean_env" do
+ describe "Bundler.with_clean_env", :bundler => 2 do
it "should set ENV to unbundled_env in the block" do
expected = Bundler.unbundled_env
actual = Bundler.with_clean_env { ENV.to_hash }
@@ -161,7 +161,7 @@ RSpec.describe "Bundler.with_env helpers" do
end
end
- describe "Bundler.clean_system" do
+ describe "Bundler.clean_system", :bundler => 2 do
it "runs system inside with_clean_env" do
code = 'exit Bundler.clean_system(%(test "\$BUNDLE_FOO" = "bar"))'
lib = File.expand_path("../../lib", __dir__)
@@ -199,7 +199,7 @@ RSpec.describe "Bundler.with_env helpers" do
end
end
- describe "Bundler.clean_exec" do
+ describe "Bundler.clean_exec", :bundler => 2 do
let(:code) do
<<~RUBY
Process.fork do