ruby/spec/bundler/install/gems/gemfile_source_header_spec.rb
David Rodríguez bda2d90969 Rewrite specs to not start local dev servers
They cause flakies when different tests start them in parallel, and also
make the specs more complicated.
2025-06-30 12:56:50 +09:00

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