浏览代码

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

git-svn-id: http://svn.redmine.org/redmine/trunk@18812 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.1.0
Toshi MARUYAMA 4 年前
父节点
当前提交
1ae761d169
共有 2 个文件被更改,包括 1 次插入2 次删除
  1. 0
    1
      .rubocop_todo.yml
  2. 1
    1
      test/unit/lib/redmine/views/builders/json_test.rb

+ 0
- 1
.rubocop_todo.yml 查看文件

@@ -532,7 +532,6 @@ Performance/RedundantBlockCall:
- 'app/controllers/application_controller.rb'
- 'lib/redmine/views/builders/structure.rb'
- 'test/functional/repositories_git_controller_test.rb'
- 'test/unit/lib/redmine/views/builders/json_test.rb'

# Cop supports --auto-correct.
Performance/RedundantMatch:

+ 1
- 1
test/unit/lib/redmine/views/builders/json_test.rb 查看文件

@@ -110,7 +110,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase

def assert_json_output(expected, &block)
builder = Redmine::Views::Builders::Json.new(ActionDispatch::TestRequest.create, ActionDispatch::TestResponse.create)
block.call(builder)
yield(builder)
assert_equal(expected, ActiveSupport::JSON.decode(builder.output))
end
end

正在加载...
取消
保存