Skip to content

Commit

Permalink
Merge pull request #15993 from eduardoj/refactoring/rubocop_lint_usel…
Browse files Browse the repository at this point in the history
…ess_method_definition

Manually correct one Lint/UselessMethodDefinition RuboCop offense
  • Loading branch information
saraycp committed Apr 16, 2024
2 parents 8a36db6 + 84d3b18 commit 6607614
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
3 changes: 1 addition & 2 deletions src/api/.rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,12 @@ Lint/SuppressedException:
- 'lib/obsapi/markdown_renderer.rb'
- 'spec/models/project_spec.rb'

# Offense count: 2
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AutoCorrect.
Lint/UselessMethodDefinition:
Exclude:
- 'app/controllers/webui/requests/submissions_controller.rb'
- 'test/test_helper.rb'

# Offense count: 905
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Expand Down
43 changes: 21 additions & 22 deletions src/api/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,28 +113,27 @@ def self.sort_order
end
end

class ActionDispatch::IntegrationTest
# usually we do only test at the end of all tests to not slow down too much.
# but for debugging or for deep testing the check can be run after each test case
def after_teardown
super
# begin
# # something else is going wrong in some random test and you do not know where?
# # add the specific test for it here:
# # login_king
# # get "/source/home:Iggy/TestPack/_link"
# # assert_response 404
#
# # simple test that the objects itself or the same in backend and api.
# # it does not check the content (eg. repository list in project meta)
# compare_project_and_package_lists
# rescue MiniTest::Assertion => e
# puts "Backend became out of sync in #{name}"
# puts e.inspect
# exit
# end
end
end
# class ActionDispatch::IntegrationTest
# # usually we do only test at the end of all tests to not slow down too much.
# # but for debugging or for deep testing the check can be run after each test case
# def after_teardown
# begin
# # something else is going wrong in some random test and you do not know where?
# # add the specific test for it here:
# # login_king
# # get "/source/home:Iggy/TestPack/_link"
# # assert_response 404
#
# # simple test that the objects itself or the same in backend and api.
# # it does not check the content (eg. repository list in project meta)
# compare_project_and_package_lists
# rescue MiniTest::Assertion => e
# puts "Backend became out of sync in #{name}"
# puts e.inspect
# exit
# end
# end
# end

module ActionDispatch
module Integration
Expand Down

0 comments on commit 6607614

Please sign in to comment.