Commit e960176b authored by mehulsharma's avatar mehulsharma

Fix OpenStruct use

Fixed OpenStruct use since Ruby 3 discourages it

Changelog: changed
parent cccf2b50
......@@ -2608,7 +2608,6 @@ Style/OpenStructUse:
- 'spec/lib/gitlab/gitaly_client/diff_stitcher_spec.rb'
- 'spec/lib/gitlab/grape_logging/loggers/exception_logger_spec.rb'
- 'spec/lib/gitlab/grape_logging/loggers/perf_logger_spec.rb'
- 'spec/lib/gitlab/grape_logging/loggers/queue_duration_logger_spec.rb'
- 'spec/lib/gitlab/graphql/pagination/keyset/connection_generic_keyset_spec.rb'
- 'spec/lib/gitlab/graphql/pagination/keyset/connection_spec.rb'
- 'spec/lib/gitlab/legacy_github_import/project_creator_spec.rb'
......
......@@ -9,7 +9,7 @@ RSpec.describe Gitlab::GrapeLogging::Loggers::QueueDurationLogger do
let(:start_time) { Time.new(2018, 01, 01) }
describe 'when no proxy time is available' do
let(:mock_request) { OpenStruct.new(env: {}) }
let(:mock_request) { double('env', env: {}) }
it 'returns an empty hash' do
expect(subject.parameters(mock_request, nil)).to eq({})
......@@ -18,7 +18,7 @@ RSpec.describe Gitlab::GrapeLogging::Loggers::QueueDurationLogger do
describe 'when a proxy time is available' do
let(:mock_request) do
OpenStruct.new(
double('env',
env: {
'HTTP_GITLAB_WORKHORSE_PROXY_START' => (start_time - 1.hour).to_i * (10**9)
}
......
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