]> source.dussan.org Git - redmine.git/commitdiff
Fix RuboCop offense Style/ArgumentsForwarding (#38585).
authorGo MAEDA <maeda@farend.jp>
Sat, 27 Jan 2024 06:18:38 +0000 (06:18 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 27 Jan 2024 06:18:38 +0000 (06:18 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@22653 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/test_helper.rb

index e64407945e649525f9ee9ddd93d82cd72211b5d3..dcd5f198f4251ac0cbbbfc84e6245b523f79e45d 100644 (file)
@@ -252,17 +252,17 @@ class ActiveSupport::TestCase
     assert !s.include?(expected), (message || "\"#{expected}\" found in \"#{s}\"")
   end
 
-  def assert_select_in(text, *args, &block)
+  def assert_select_in(text, ...)
     d = Nokogiri::HTML(CGI.unescapeHTML(String.new(text))).root
-    assert_select(d, *args, &block)
+    assert_select(d, ...)
   end
 
-  def assert_select_email(*args, &block)
+  def assert_select_email(...)
     email = ActionMailer::Base.deliveries.last
     assert_not_nil email
     html_body = email.parts.detect {|part| part.content_type.include?('text/html')}.try(&:body)
     assert_not_nil html_body
-    assert_select_in html_body.encoded, *args, &block
+    assert_select_in(html_body.encoded, ...)
   end
 
   def assert_mail_body_match(expected, mail, message=nil)