Commit cab0eb27 authored by mehulsharma's avatar mehulsharma

Fix OpenStruct use

Fixes OpenStruct use since Ruby 3 discourages it

Changelog: other
parent 43c04220
......@@ -2607,7 +2607,6 @@ Style/OpenStructUse:
- 'spec/models/design_management/design_at_version_spec.rb'
- 'spec/models/user_spec.rb'
- 'spec/presenters/packages/nuget/search_results_presenter_spec.rb'
- 'spec/requests/api/graphql/mutations/design_management/delete_spec.rb'
- 'spec/requests/api/import_github_spec.rb'
- 'spec/services/packages/nuget/metadata_extraction_service_spec.rb'
- 'spec/services/projects/import_service_spec.rb'
......
......@@ -53,7 +53,7 @@ RSpec.describe "deleting designs" do
context 'the designs list contains filenames we cannot find' do
it_behaves_like 'a failed request' do
let(:designs) { %w/foo bar baz/.map { |fn| OpenStruct.new(filename: fn) } }
let(:designs) { %w/foo bar baz/.map { |fn| instance_double('file', filename: fn) } }
let(:the_error) { a_string_matching %r/filenames were not found/ }
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