Commit db0a1d45 by andrew morton

Make rubocop happy

parent cf36412a
...@@ -23,7 +23,7 @@ module RSpec ...@@ -23,7 +23,7 @@ module RSpec
document = document_for(metadata[:swagger_document]) document = document_for(metadata[:swagger_document])
path_item = path_item_for(document, metadata[:swagger_path_item]) path_item = path_item_for(document, metadata[:swagger_path_item])
operation = operation_for(path_item, metadata[:swagger_operation]) operation = operation_for(path_item, metadata[:swagger_operation])
response = response_for(operation, metadata[:swagger_response]) response_for(operation, metadata[:swagger_response])
end end
def close(_notification) def close(_notification)
...@@ -93,7 +93,7 @@ module RSpec ...@@ -93,7 +93,7 @@ module RSpec
if examples["application/json"].present? if examples["application/json"].present?
begin begin
examples["application/json"] = JSON.parse(examples["application/json"]) examples["application/json"] = JSON.parse(examples["application/json"])
rescue JSON::ParserError => e rescue JSON::ParserError
end end
end end
examples examples
......
...@@ -65,7 +65,7 @@ module RSpec ...@@ -65,7 +65,7 @@ module RSpec
base_path = document[:basePath] || '' base_path = document[:basePath] || ''
# Find params in the path and replace them with values defined in # Find params in the path and replace them with values defined in
# in the example group. # in the example group.
path = base_path + metadata[:swagger_path_item][:path].gsub(/(\{.*?\})/) do |match| base_path + metadata[:swagger_path_item][:path].gsub(/(\{.*?\})/) do |match|
# QUESTION: Should check that the parameter is actually defined in # QUESTION: Should check that the parameter is actually defined in
# `parameters` before fetch a value? # `parameters` before fetch a value?
instance.send(match[1...-1]) instance.send(match[1...-1])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment