diff options
Diffstat (limited to 'spec/bundler')
-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.rb | 2 | ||||
-rw-r--r-- | spec/bundler/realworld/edgecases_spec.rb | 6 | ||||
-rw-r--r-- | spec/bundler/runtime/setup_spec.rb | 4 |
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) |