Skip to content

Commit 8558e2b

Browse files
committed
fix: rubocop
1 parent e7d2358 commit 8558e2b

2 files changed

Lines changed: 25 additions & 17 deletions

File tree

lib/packs/private/file_move_operation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def spec_file_move_operations
7272
origin_pathname: new_origin_pathname,
7373
destination_pathname: new_destination_pathname,
7474
destination_pack: destination_pack
75-
)
75+
),
7676
]
7777

7878
# For controllers, also include the request spec (spec/requests/<name>_spec.rb) if it exists.

spec/packs_spec.rb

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -418,14 +418,18 @@ def write_codeownership_config
418418
paths_relative_to_root: ['app/controllers/my_controller.rb']
419419
)
420420

421-
expect_files_to_not_exist([
422-
'app/controllers/my_controller.rb',
423-
'spec/requests/my_spec.rb'
424-
])
425-
expect_files_to_exist([
426-
'packs/my_pack/app/controllers/my_controller.rb',
427-
'packs/my_pack/spec/requests/my_spec.rb'
428-
])
421+
expect_files_to_not_exist(
422+
[
423+
'app/controllers/my_controller.rb',
424+
'spec/requests/my_spec.rb',
425+
]
426+
)
427+
expect_files_to_exist(
428+
[
429+
'packs/my_pack/app/controllers/my_controller.rb',
430+
'packs/my_pack/spec/requests/my_spec.rb',
431+
]
432+
)
429433
end
430434

431435
it 'moves namespaced request spec when moving a namespaced controller' do
@@ -437,14 +441,18 @@ def write_codeownership_config
437441
paths_relative_to_root: ['app/controllers/api/v1/users_controller.rb']
438442
)
439443

440-
expect_files_to_not_exist([
441-
'app/controllers/api/v1/users_controller.rb',
442-
'spec/requests/api/v1/users_spec.rb'
443-
])
444-
expect_files_to_exist([
445-
'packs/my_pack/app/controllers/api/v1/users_controller.rb',
446-
'packs/my_pack/spec/requests/api/v1/users_spec.rb'
447-
])
444+
expect_files_to_not_exist(
445+
[
446+
'app/controllers/api/v1/users_controller.rb',
447+
'spec/requests/api/v1/users_spec.rb',
448+
]
449+
)
450+
expect_files_to_exist(
451+
[
452+
'packs/my_pack/app/controllers/api/v1/users_controller.rb',
453+
'packs/my_pack/spec/requests/api/v1/users_spec.rb',
454+
]
455+
)
448456
end
449457

450458
it 'does not move a request spec when no file exists at spec/requests/<name>_spec.rb' do

0 commit comments

Comments
 (0)