зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Make tests compatible with paths that contain a + char
https://github.com/rubygems/rubygems/commit/3355c80c90
This commit is contained in:
Родитель
3b9ea6648f
Коммит
0e05392dcc
|
@ -74,16 +74,16 @@ RSpec.describe "bundle info" do
|
|||
|
||||
bundle "info rails --path"
|
||||
|
||||
expect(err).to match(/The gem rails has been deleted/i)
|
||||
expect(err).to match(default_bundle_path("gems", "rails-2.3.2").to_s)
|
||||
expect(err).to include("The gem rails has been deleted.")
|
||||
expect(err).to include(default_bundle_path("gems", "rails-2.3.2").to_s)
|
||||
|
||||
bundle "info rail --path"
|
||||
expect(err).to match(/The gem rails has been deleted/i)
|
||||
expect(err).to match(default_bundle_path("gems", "rails-2.3.2").to_s)
|
||||
expect(err).to include("The gem rails has been deleted.")
|
||||
expect(err).to include(default_bundle_path("gems", "rails-2.3.2").to_s)
|
||||
|
||||
bundle "info rails"
|
||||
expect(err).to match(/The gem rails has been deleted/i)
|
||||
expect(err).to match(default_bundle_path("gems", "rails-2.3.2").to_s)
|
||||
expect(err).to include("The gem rails has been deleted.")
|
||||
expect(err).to include(default_bundle_path("gems", "rails-2.3.2").to_s)
|
||||
end
|
||||
|
||||
context "given a default gem shippped in ruby", :ruby_repo do
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -181,8 +181,8 @@ RSpec.describe "bundle pristine" do
|
|||
bundle "pristine"
|
||||
|
||||
makefile_contents = File.read(c_ext_dir.join("Makefile").to_s)
|
||||
expect(makefile_contents).to match(/libpath =.*#{c_ext_dir}/)
|
||||
expect(makefile_contents).to match(/LIBPATH =.*-L#{c_ext_dir}/)
|
||||
expect(makefile_contents).to match(/libpath =.*#{Regexp.escape(c_ext_dir.to_s)}/)
|
||||
expect(makefile_contents).to match(/LIBPATH =.*-L#{Regexp.escape(c_ext_dir.to_s)}/)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -198,8 +198,8 @@ RSpec.describe "bundle pristine" do
|
|||
bundle "pristine"
|
||||
|
||||
makefile_contents = File.read(c_ext_dir.join("Makefile").to_s)
|
||||
expect(makefile_contents).to match(/libpath =.*#{c_ext_dir}/)
|
||||
expect(makefile_contents).to match(/LIBPATH =.*-L#{c_ext_dir}/)
|
||||
expect(makefile_contents).to match(/libpath =.*#{Regexp.escape(c_ext_dir.to_s)}/)
|
||||
expect(makefile_contents).to match(/LIBPATH =.*-L#{Regexp.escape(c_ext_dir.to_s)}/)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче