Commit 040a96a3 authored by Patrick Bajao's avatar Patrick Bajao

Fix Ruby 2.7 warnings in file collection specs

In Ruby 3.0, positional arguments and keyword arguments will be
separated. In Ruby 2.7, deprecation warnings related to keyword
arguments show up.

Use a double splat to specify `collection_default_args` as keyword
arguments. The `diff statistics` shared example is also used in
other file collection specs so the warnings in those specs are
also fixed.
parent 387ae1dc
......@@ -120,7 +120,7 @@ RSpec.describe Gitlab::Diff::FileCollection::MergeRequestDiffBatch do
described_class.new(merge_request.merge_request_diff,
batch_page,
batch_size,
collection_default_args)
**collection_default_args)
end
end
......
# frozen_string_literal: true
RSpec.shared_examples 'diff statistics' do |test_include_stats_flag: true|
subject { described_class.new(diffable, collection_default_args) }
subject { described_class.new(diffable, **collection_default_args) }
def stub_stats_find_by_path(path, stats_mock)
expect_next_instance_of(Gitlab::Git::DiffStatsCollection) do |collection|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment