diff options
author | Martin Emde <martin.emde@gmail.com> | 2023-12-08 11:25:23 -0800 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-12-12 10:04:57 +0900 |
commit | 0e05392dccaaf4f9a0ce66228fd64dbd96b62227 (patch) | |
tree | 660a1fb06b3abeffeb7279bb2262cb7a8d60def7 /spec/bundler/commands/open_spec.rb | |
parent | 3b9ea6648fcc110769c27686ebdc51fbbf1798c8 (diff) |
[rubygems/rubygems] Make tests compatible with paths that contain a + char
https://github.com/rubygems/rubygems/commit/3355c80c90
Diffstat (limited to 'spec/bundler/commands/open_spec.rb')
-rw-r--r-- | spec/bundler/commands/open_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/bundler/commands/open_spec.rb b/spec/bundler/commands/open_spec.rb index a51158b0dc..97374f30c3 100644 --- a/spec/bundler/commands/open_spec.rb +++ b/spec/bundler/commands/open_spec.rb @@ -44,7 +44,7 @@ RSpec.describe "bundle open" do G bundle "open foo", env: { "EDITOR" => "echo editor", "VISUAL" => "", "BUNDLER_EDITOR" => "" } - expect(out).to match("editor #{default_bundle_path.join("bundler/gems/foo-1.0-#{ref}")}") + expect(out).to include("editor #{default_bundle_path.join("bundler", "gems", "foo-1.0-#{ref}")}") end it "suggests alternatives for similar-sounding gems" do @@ -104,7 +104,7 @@ RSpec.describe "bundle open" do input.puts "2" end - expect(out).to match(%r{bundler_editor #{default_bundle_path("gems", "activerecord-2.3.2")}/CHANGELOG\.md\z}) + expect(out).to include("bundler_editor #{default_bundle_path("gems", "activerecord-2.3.2").join("CHANGELOG.md")}") end it "opens deep subpath of the selected matching gem", :readline do @@ -113,7 +113,7 @@ RSpec.describe "bundle open" do input.puts "2" end - expect(out).to match(%r{bundler_editor #{default_bundle_path("gems", "activerecord-2.3.2")}/lib/activerecord/version\.rb\z}) + expect(out).to include("bundler_editor #{default_bundle_path("gems", "activerecord-2.3.2").join("lib", "activerecord", "version.rb")}") end it "select the gem from many match gems", :readline do @@ -122,7 +122,7 @@ RSpec.describe "bundle open" do input.puts "2" end - expect(out).to match(/bundler_editor #{default_bundle_path("gems", "activerecord-2.3.2")}\z/) + expect(out).to include("bundler_editor #{default_bundle_path("gems", "activerecord-2.3.2")}") end it "allows selecting exit from many match gems", :readline do |