summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-08-03 12:24:38 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-08-03 13:14:10 +0900
commit71794a75db5d3da810146da106baf7eb5e86f745 (patch)
treec354ae515036c15a96a079712f3b7427c807be18 /spec
parent8a1be433e8cac6ca5ded095f6fefbdc1009102b9 (diff)
Merge rubygems/bundler HEAD
Pick from https://github.com/rubygems/rubygems/commit/8331e63263081a6aa690d8025d2957f30c4e814a
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6209
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/commands/platform_spec.rb (renamed from spec/bundler/other/platform_spec.rb)2
-rw-r--r--spec/bundler/quality_spec.rb2
-rw-r--r--spec/bundler/realworld/edgecases_spec.rb6
-rw-r--r--spec/bundler/runtime/setup_spec.rb4
4 files changed, 7 insertions, 7 deletions
diff --git a/spec/bundler/other/platform_spec.rb b/spec/bundler/commands/platform_spec.rb
index 691a219e62..0b964eac8c 100644
--- a/spec/bundler/other/platform_spec.rb
+++ b/spec/bundler/commands/platform_spec.rb
@@ -231,7 +231,7 @@ G
L
bundle "platform --ruby"
- expect(out).to eq("ruby 1.0.0p127")
+ expect(out).to eq("ruby 1.0.0")
end
it "handles when there is a requirement in the gemfile" do
diff --git a/spec/bundler/quality_spec.rb b/spec/bundler/quality_spec.rb
index 62f3722a39..ee98bcd4d7 100644
--- a/spec/bundler/quality_spec.rb
+++ b/spec/bundler/quality_spec.rb
@@ -22,7 +22,7 @@ RSpec.describe "The library itself" do
def check_for_tab_characters(filename)
failing_lines = []
each_line(filename) do |line, number|
- failing_lines << number + 1 if line =~ /\t/
+ failing_lines << number + 1 if line.include?("\t")
end
return if failing_lines.empty?
diff --git a/spec/bundler/realworld/edgecases_spec.rb b/spec/bundler/realworld/edgecases_spec.rb
index 30c922efb0..2a667011a1 100644
--- a/spec/bundler/realworld/edgecases_spec.rb
+++ b/spec/bundler/realworld/edgecases_spec.rb
@@ -218,7 +218,7 @@ RSpec.describe "real world edgecases", :realworld => true do
end
it "doesn't hang on big gemfile" do
- skip "Only for ruby 2.7.3" if RUBY_VERSION != "2.7.3" || RUBY_PLATFORM =~ /darwin/
+ skip "Only for ruby 2.7.3" if RUBY_VERSION != "2.7.3" || RUBY_PLATFORM.include?("darwin")
gemfile <<~G
# frozen_string_literal: true
@@ -330,7 +330,7 @@ RSpec.describe "real world edgecases", :realworld => true do
end
it "doesn't hang on tricky gemfile" do
- skip "Only for ruby 2.7.3" if RUBY_VERSION != "2.7.3" || RUBY_PLATFORM =~ /darwin/
+ skip "Only for ruby 2.7.3" if RUBY_VERSION != "2.7.3" || RUBY_PLATFORM.include?("darwin")
gemfile <<~G
source 'https://rubygems.org'
@@ -356,7 +356,7 @@ RSpec.describe "real world edgecases", :realworld => true do
end
it "doesn't hang on nix gemfile" do
- skip "Only for ruby 3.0.1" if RUBY_VERSION != "3.0.1" || RUBY_PLATFORM =~ /darwin/
+ skip "Only for ruby 3.0.1" if RUBY_VERSION != "3.0.1" || RUBY_PLATFORM.include?("darwin")
gemfile <<~G
source "https://rubygems.org" do
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb
index 4390f0fb17..29445b420c 100644
--- a/spec/bundler/runtime/setup_spec.rb
+++ b/spec/bundler/runtime/setup_spec.rb
@@ -370,7 +370,7 @@ RSpec.describe "Bundler.setup" do
context "when the ruby stdlib is a substring of Gem.path" do
it "does not reject the stdlib from $LOAD_PATH" do
- substring = "/" + $LOAD_PATH.find {|p| p =~ /vendor_ruby/ }.split("/")[2]
+ substring = "/" + $LOAD_PATH.find {|p| p.include?("vendor_ruby") }.split("/")[2]
run "puts 'worked!'", :env => { "GEM_PATH" => substring }
expect(out).to eq("worked!")
end
@@ -865,7 +865,7 @@ end
gemspec_content = File.binread(gemspec).
sub("Bundler::VERSION", %("#{Bundler::VERSION}")).
- lines.reject {|line| line =~ %r{lib/bundler/version} }.join
+ lines.reject {|line| line.include?("lib/bundler/version") }.join
File.open(File.join(specifications_dir, "#{full_name}.gemspec"), "wb") do |f|
f.write(gemspec_content)