Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
459ad59f
Commit
459ad59f
authored
Dec 02, 2021
by
mehulsharma
Committed by
Peter Leitzen
Jan 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes OpenStruct use in design_management specs
Fixes OpenStruct use as Ruby 3 discourages it Changelog: other
parent
ac256f46
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
.rubocop_todo/style/open_struct_use.yml
.rubocop_todo/style/open_struct_use.yml
+0
-2
spec/models/design_management/design_action_spec.rb
spec/models/design_management/design_action_spec.rb
+2
-2
spec/models/design_management/design_at_version_spec.rb
spec/models/design_management/design_at_version_spec.rb
+1
-1
No files found.
.rubocop_todo/style/open_struct_use.yml
View file @
459ad59f
...
@@ -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
...
...
spec/models/design_management/design_action_spec.rb
View file @
459ad59f
...
@@ -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
)
}
...
...
spec/models/design_management/design_at_version_spec.rb
View file @
459ad59f
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment