code cleanup: rubocop: fix Performance/RedundantBlockCall in test/unit/lib/redmine/views/builders/xml_test.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18811 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2019-10-22 12:09:52 +00:00
parent b7b42e9d76
commit 3d342396a0
2 changed files with 1 additions and 2 deletions

View File

@@ -533,7 +533,6 @@ Performance/RedundantBlockCall:
- 'lib/redmine/views/builders/structure.rb'
- 'test/functional/repositories_git_controller_test.rb'
- 'test/unit/lib/redmine/views/builders/json_test.rb'
- 'test/unit/lib/redmine/views/builders/xml_test.rb'
# Cop supports --auto-correct.
Performance/RedundantMatch:

View File

@@ -63,7 +63,7 @@ class Redmine::Views::Builders::XmlTest < ActiveSupport::TestCase
def assert_xml_output(expected, &block)
builder = Redmine::Views::Builders::Xml.new(ActionDispatch::TestRequest.create, ActionDispatch::TestResponse.create)
block.call(builder)
yield(builder)
assert_equal('<?xml version="1.0" encoding="UTF-8"?>' + expected, builder.output)
end
end