Commit 459ad59f authored by mehulsharma's avatar mehulsharma Committed by Peter Leitzen

Fixes OpenStruct use in design_management specs

Fixes OpenStruct use as Ruby 3 discourages it

Changelog: other
parent ac256f46
...@@ -30,8 +30,6 @@ Style/OpenStructUse: ...@@ -30,8 +30,6 @@ Style/OpenStructUse:
- spec/lib/gitlab/gitaly_client/diff_stitcher_spec.rb - spec/lib/gitlab/gitaly_client/diff_stitcher_spec.rb
- spec/lib/gitlab/legacy_github_import/project_creator_spec.rb - spec/lib/gitlab/legacy_github_import/project_creator_spec.rb
- spec/lib/gitlab/quick_actions/command_definition_spec.rb - spec/lib/gitlab/quick_actions/command_definition_spec.rb
- spec/models/design_management/design_action_spec.rb
- spec/models/design_management/design_at_version_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
- spec/support/helpers/import_spec_helper.rb - spec/support/helpers/import_spec_helper.rb
......
...@@ -46,7 +46,7 @@ RSpec.describe DesignManagement::DesignAction do ...@@ -46,7 +46,7 @@ RSpec.describe DesignManagement::DesignAction do
describe '#gitaly_action' do describe '#gitaly_action' do
let(:path) { 'some/path/somewhere' } let(:path) { 'some/path/somewhere' }
let(:design) { OpenStruct.new(full_path: path) } let(:design) { double('path', full_path: path) }
subject { described_class.new(design, action, content) } subject { described_class.new(design, action, content) }
...@@ -75,7 +75,7 @@ RSpec.describe DesignManagement::DesignAction do ...@@ -75,7 +75,7 @@ RSpec.describe DesignManagement::DesignAction do
describe '#issue_id' do describe '#issue_id' do
let(:issue_id) { :foo } let(:issue_id) { :foo }
let(:design) { OpenStruct.new(issue_id: issue_id) } let(:design) { double('id', issue_id: issue_id) }
subject { described_class.new(design, :delete) } subject { described_class.new(design, :delete) }
......
...@@ -59,7 +59,7 @@ RSpec.describe DesignManagement::DesignAtVersion do ...@@ -59,7 +59,7 @@ RSpec.describe DesignManagement::DesignAtVersion do
it 'rejects objects with the same id and the wrong class' do it 'rejects objects with the same id and the wrong class' do
dav = build_stubbed(:design_at_version) dav = build_stubbed(:design_at_version)
expect(dav).not_to eq(OpenStruct.new(id: dav.id)) expect(dav).not_to eq(double('id', id: dav.id))
end end
it 'expects objects to be of the same type, not subtypes' do it 'expects objects to be of the same type, not subtypes' do
......
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