mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00

They cause flakies when different tests start them in parallel, and also make the specs more complicated.
24 lines
625 B
Ruby
24 lines
625 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe "fetching dependencies with a mirrored source" do
|
|
let(:mirror) { "https://server.example.org" }
|
|
|
|
before do
|
|
build_repo2
|
|
|
|
gemfile <<-G
|
|
source "#{mirror}"
|
|
gem 'weakling'
|
|
G
|
|
|
|
bundle "config set --local mirror.#{mirror} https://gem.repo2"
|
|
end
|
|
|
|
it "sets the 'X-Gemfile-Source' and 'User-Agent' headers and bundles successfully" do
|
|
bundle :install, artifice: "endpoint_mirror_source"
|
|
|
|
expect(out).to include("Installing weakling")
|
|
expect(out).to include("Bundle complete")
|
|
expect(the_bundle).to include_gems "weakling 0.0.3"
|
|
end
|
|
end
|