summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-01-23 09:40:57 +0000
committerBundlerbot <bot@bundler.io>2019-01-23 09:40:57 +0000
commitf5e00a5867d09da235971db0bec4341db3312b29 (patch)
tree79e7f41b581e1fbf30f1512778f55d7978473d0d /spec
parent4557124b5ea30821895eb2686874cb4219f404e2 (diff)
parenta98852235bf9080fccf2b0670f817d68c3b5dbaf (diff)
downloadbundler-f5e00a5867d09da235971db0bec4341db3312b29.tar.gz
Merge #6793
6793: Removed exe/bundle_ruby and its example. r=hsbt a=hsbt Originated from #3489 `exe/bundle_ruby` was already removed from bundler's gemspec. We can remove it now. Co-authored-by: SHIBATA Hiroshi <hsbt@ruby-lang.org>
Diffstat (limited to 'spec')
-rw-r--r--spec/other/bundle_ruby_spec.rb155
-rw-r--r--spec/other/major_deprecation_spec.rb8
-rw-r--r--spec/support/helpers.rb5
3 files changed, 0 insertions, 168 deletions
diff --git a/spec/other/bundle_ruby_spec.rb b/spec/other/bundle_ruby_spec.rb
deleted file mode 100644
index a7da9cbec9..0000000000
--- a/spec/other/bundle_ruby_spec.rb
+++ /dev/null
@@ -1,155 +0,0 @@
-# frozen_string_literal: true
-
-RSpec.describe "bundle_ruby", :bundler => "< 2" do
- context "without patchlevel" do
- it "returns the ruby version" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.9.3", :engine => 'ruby', :engine_version => '1.9.3'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.9.3")
- end
-
- it "engine defaults to MRI" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.9.3"
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.9.3")
- end
-
- it "handles jruby" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.8.7", :engine => 'jruby', :engine_version => '1.6.5'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.8.7 (jruby 1.6.5)")
- end
-
- it "handles rbx" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.8.7", :engine => 'rbx', :engine_version => '1.2.4'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.8.7 (rbx 1.2.4)")
- end
-
- it "handles truffleruby", :rubygems => ">= 2.1.0" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "2.5.1", :engine => 'truffleruby', :engine_version => '1.0.0-rc6'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 2.5.1 (truffleruby 1.0.0-rc6)")
- end
-
- it "raises an error if engine is used but engine version is not" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.8.7", :engine => 'rbx'
-
- gem "foo"
- G
-
- bundle_ruby
- expect(exitstatus).not_to eq(0) if exitstatus
-
- bundle_ruby
- expect(out).to include("Please define :engine_version")
- end
-
- it "raises an error if engine_version is used but engine is not" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.8.7", :engine_version => '1.2.4'
-
- gem "foo"
- G
-
- bundle_ruby
- expect(exitstatus).not_to eq(0) if exitstatus
-
- bundle_ruby
- expect(out).to include("Please define :engine")
- end
-
- it "raises an error if engine version doesn't match ruby version for MRI" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.8.7", :engine => 'ruby', :engine_version => '1.2.4'
-
- gem "foo"
- G
-
- bundle_ruby
- expect(exitstatus).not_to eq(0) if exitstatus
-
- bundle_ruby
- expect(out).to include("ruby_version must match the :engine_version for MRI")
- end
-
- it "should print if no ruby version is specified" do
- gemfile <<-G
- source "file://#{gem_repo1}"
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("No ruby version specified")
- end
- end
-
- context "when using patchlevel" do
- it "returns the ruby version" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.9.3", :patchlevel => '429', :engine => 'ruby', :engine_version => '1.9.3'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.9.3p429")
- end
-
- it "handles an engine" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- ruby "1.9.3", :patchlevel => '392', :engine => 'jruby', :engine_version => '1.7.4'
-
- gem "foo"
- G
-
- bundle_ruby
-
- expect(out).to include("ruby 1.9.3p392 (jruby 1.7.4)")
- end
- end
-end
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index ce2735ba94..e8de574c79 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -31,14 +31,6 @@ RSpec.describe "major deprecations", :bundler => "< 2" do
bundle! "install"
end
- describe "bundle_ruby" do
- it "prints a deprecation" do
- bundle_ruby
- warnings.gsub! "\nruby #{RUBY_VERSION}", ""
- expect(warnings).to have_major_deprecation "the bundle_ruby executable has been removed in favor of `bundle platform --ruby`"
- end
- end
-
describe "Bundler" do
describe ".clean_env" do
it "is deprecated in favor of .unbundled_env" do
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 9126256f8e..af6b1c556a 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -174,11 +174,6 @@ module Spec
bundle(cmd, options)
end
- def bundle_ruby(options = {})
- options["bundle_bin"] = bindir.join("bundle_ruby")
- bundle("", options)
- end
-
def ruby(ruby, options = {})
env = (options.delete(:env) || {}).map {|k, v| "#{k}='#{v}' " }.join
ruby = ruby.gsub(/["`\$]/) {|m| "\\#{m}" }