diff options
Diffstat (limited to 'spec/bundler/fetcher_spec.rb')
-rw-r--r-- | spec/bundler/fetcher_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/bundler/fetcher_spec.rb b/spec/bundler/fetcher_spec.rb index 184b9efa64..539179db43 100644 --- a/spec/bundler/fetcher_spec.rb +++ b/spec/bundler/fetcher_spec.rb @@ -3,7 +3,7 @@ require "bundler/fetcher" RSpec.describe Bundler::Fetcher do - let(:uri) { URI("https://example.com") } + let(:uri) { Bundler::URI("https://example.com") } let(:remote) { double("remote", :uri => uri, :original_uri => nil) } subject(:fetcher) { Bundler::Fetcher.new(remote) } @@ -45,7 +45,7 @@ RSpec.describe Bundler::Fetcher do end context "when a rubygems source mirror is set" do - let(:orig_uri) { URI("http://zombo.com") } + let(:orig_uri) { Bundler::URI("http://zombo.com") } let(:remote_with_mirror) do double("remote", :uri => uri, :original_uri => orig_uri, :anonymized_uri => uri) end @@ -144,14 +144,14 @@ RSpec.describe Bundler::Fetcher do describe "include CI information" do it "from one CI" do with_env_vars("JENKINS_URL" => "foo") do - ci_part = fetcher.user_agent.split(" ").find {|x| x.match(%r{\Aci/}) } + ci_part = fetcher.user_agent.split(" ").find {|x| x.start_with?("ci/") } expect(ci_part).to match("jenkins") end end it "from many CI" do with_env_vars("TRAVIS" => "foo", "CI_NAME" => "my_ci") do - ci_part = fetcher.user_agent.split(" ").find {|x| x.match(%r{\Aci/}) } + ci_part = fetcher.user_agent.split(" ").find {|x| x.start_with?("ci/") } expect(ci_part).to match("travis") expect(ci_part).to match("my_ci") end |