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
6bc58b03
Commit
6bc58b03
authored
Nov 12, 2021
by
mehulsharma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix OpenStruct use
Fixes OpenStruct use in range_spec Changelog: other
parent
88583e09
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-1
spec/lib/gitlab/relative_positioning/range_spec.rb
spec/lib/gitlab/relative_positioning/range_spec.rb
+10
-8
No files found.
.rubocop_manual_todo.yml
View file @
6bc58b03
...
...
@@ -2598,7 +2598,6 @@ Style/OpenStructUse:
-
'
spec/lib/gitlab/graphql/pagination/keyset/connection_spec.rb'
-
'
spec/lib/gitlab/legacy_github_import/project_creator_spec.rb'
-
'
spec/lib/gitlab/quick_actions/command_definition_spec.rb'
-
'
spec/lib/gitlab/relative_positioning/range_spec.rb'
-
'
spec/models/design_management/design_action_spec.rb'
-
'
spec/models/design_management/design_at_version_spec.rb'
-
'
spec/models/user_spec.rb'
...
...
spec/lib/gitlab/relative_positioning/range_spec.rb
View file @
6bc58b03
...
...
@@ -3,8 +3,10 @@
require
'spec_helper'
RSpec
.
describe
Gitlab
::
RelativePositioning
::
Range
do
item_a
=
OpenStruct
.
new
(
relative_position:
100
,
object: :x
,
positioned?:
true
)
item_b
=
OpenStruct
.
new
(
relative_position:
200
,
object: :y
,
positioned?:
true
)
position_struct
=
Struct
.
new
(
:relative_position
,
:object
,
:positioned?
)
item_a
=
position_struct
.
new
(
100
,
:x
,
true
)
item_b
=
position_struct
.
new
(
200
,
:y
,
true
)
before
do
allow
(
item_a
).
to
receive
(
:lhs_neighbour
)
{
nil
}
...
...
@@ -90,12 +92,12 @@ RSpec.describe Gitlab::RelativePositioning::Range do
end
describe
'#cover?'
do
item_c
=
OpenStruct
.
new
(
relative_position:
150
,
object: :z
,
positioned?:
true
)
item_d
=
OpenStruct
.
new
(
relative_position:
050
,
object: :w
,
positioned?:
true
)
item_e
=
OpenStruct
.
new
(
relative_position:
250
,
object: :r
,
positioned?:
true
)
item_f
=
OpenS
truct
.
new
(
positioned?:
false
)
item_ax
=
OpenStruct
.
new
(
relative_position:
100
,
object: :not_x
,
positioned?:
true
)
item_bx
=
OpenStruct
.
new
(
relative_position:
200
,
object: :not_y
,
positioned?:
true
)
item_c
=
position_struct
.
new
(
150
,
:z
,
true
)
item_d
=
position_struct
.
new
(
050
,
:w
,
true
)
item_e
=
position_struct
.
new
(
250
,
:r
,
true
)
item_f
=
position_s
truct
.
new
(
positioned?:
false
)
item_ax
=
position_struct
.
new
(
100
,
:not_x
,
true
)
item_bx
=
position_struct
.
new
(
200
,
:not_y
,
true
)
where
(
:lhs
,
:rhs
,
:item
,
:expected_result
)
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