diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-02-02 16:57:34 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-02 16:57:34 +0900 |
commit | 6794f8cf928ab8c009b301ec49a5a81e97e6eb2f (patch) | |
tree | 63f83daf2d1d2f57d6aaee9efa01e1c91ee8b021 /spec/bundler/bundler/endpoint_specification_spec.rb | |
parent | 69463805f0722d90a2049f43e852539b4532bf2e (diff) |
Merge pull request #5482 from hsbt/rubygems-3-3-bundler-2-3
Merge RubyGems 3.3.x and Bundler 2.3.x
Diffstat (limited to 'spec/bundler/bundler/endpoint_specification_spec.rb')
-rw-r--r-- | spec/bundler/bundler/endpoint_specification_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/bundler/bundler/endpoint_specification_spec.rb b/spec/bundler/bundler/endpoint_specification_spec.rb index 2e2c16ec44..02a90d507a 100644 --- a/spec/bundler/bundler/endpoint_specification_spec.rb +++ b/spec/bundler/bundler/endpoint_specification_spec.rb @@ -5,9 +5,10 @@ RSpec.describe Bundler::EndpointSpecification do let(:version) { "1.0.0" } let(:platform) { Gem::Platform::RUBY } let(:dependencies) { [] } + let(:spec_fetcher) { double(:spec_fetcher) } let(:metadata) { nil } - subject(:spec) { described_class.new(name, version, platform, dependencies, metadata) } + subject(:spec) { described_class.new(name, version, platform, spec_fetcher, dependencies, metadata) } describe "#build_dependency" do let(:name) { "foo" } @@ -48,7 +49,9 @@ RSpec.describe Bundler::EndpointSpecification do end it "supports equality comparison" do - other_spec = described_class.new("bar", version, platform, dependencies, metadata) + remote_spec = double(:remote_spec, :required_ruby_version => nil, :required_rubygems_version => nil) + allow(spec_fetcher).to receive(:fetch_spec).and_return(remote_spec) + other_spec = described_class.new("bar", version, platform, spec_fetcher, dependencies, metadata) expect(spec).to eql(spec) expect(spec).to_not eql(other_spec) end |