Commit 60451303 authored by mehulsharma's avatar mehulsharma

Fix OpenStruct use

Fixed OpenStruct use as Ruby 3 discourages it

Changelog: other
parent 4dac986c
...@@ -2605,7 +2605,6 @@ Style/OpenStructUse: ...@@ -2605,7 +2605,6 @@ Style/OpenStructUse:
- 'spec/models/design_management/design_at_version_spec.rb' - 'spec/models/design_management/design_at_version_spec.rb'
- 'spec/models/user_spec.rb' - 'spec/models/user_spec.rb'
- 'spec/presenters/packages/nuget/search_results_presenter_spec.rb' - 'spec/presenters/packages/nuget/search_results_presenter_spec.rb'
- 'spec/requests/api/import_github_spec.rb'
- 'spec/services/packages/nuget/metadata_extraction_service_spec.rb' - 'spec/services/packages/nuget/metadata_extraction_service_spec.rb'
- 'spec/services/projects/import_service_spec.rb' - 'spec/services/projects/import_service_spec.rb'
- 'spec/services/system_note_service_spec.rb' - 'spec/services/system_note_service_spec.rb'
......
...@@ -11,12 +11,12 @@ RSpec.describe API::ImportGithub do ...@@ -11,12 +11,12 @@ RSpec.describe API::ImportGithub do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
let(:provider_username) { user.username } let(:provider_username) { user.username }
let(:provider_user) { OpenStruct.new(login: provider_username) } let(:provider_user) { double('provider', login: provider_username) }
let(:provider_repo) do let(:provider_repo) do
OpenStruct.new( double('provider',
name: 'vim', name: 'vim',
full_name: "#{provider_username}/vim", full_name: "#{provider_username}/vim",
owner: OpenStruct.new(login: provider_username) owner: double('provider', login: provider_username)
) )
end end
......
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