Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually correct one Lint/UselessMethodDefinition RuboCop offense #15993

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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