From: Toshi MARUYAMA Date: Sun, 24 Nov 2019 16:45:43 +0000 (+0000) Subject: cleanup: rubocop: fix Layout/EmptyLineAfterGuardClause in test/test_helper.rb X-Git-Tag: 4.2.0~1365 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=98777fdb8b29c0d3c06c5ade45c59c650c523707;p=redmine.git cleanup: rubocop: fix Layout/EmptyLineAfterGuardClause in test/test_helper.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19275 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/test_helper.rb b/test/test_helper.rb index 0be6d5a8a..22543b30d 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -286,14 +286,14 @@ module Redmine arg = arg.dup request = arg.keys.detect {|key| key.is_a?(String)} raise ArgumentError unless request - options = arg.slice!(request) + options = arg.slice!(request) raise ArgumentError unless request =~ /\A(GET|POST|PUT|PATCH|DELETE)\s+(.+)\z/ - method, path = $1.downcase.to_sym, $2 + method, path = $1.downcase.to_sym, $2 raise ArgumentError unless arg.values.first =~ /\A(.+)#(.+)\z/ - controller, action = $1, $2 + controller, action = $1, $2 assert_routing( {:method => method, :path => path}, options.merge(:controller => controller, :action => action) @@ -430,6 +430,7 @@ module Redmine unless response.content_type.to_s =~ /^application\/(.+)/ raise "Unexpected response type: #{response.content_type}" end + format = $1 case format when 'xml' @@ -447,6 +448,7 @@ module Redmine arg = arg.dup request = arg.keys.detect {|key| key.is_a?(String)} raise ArgumentError unless request + options = arg.slice!(request) API_FORMATS.each do |format|