Commit db0a1d45 by andrew morton

Make rubocop happy

parent cf36412a
......@@ -23,7 +23,7 @@ module RSpec
document = document_for(metadata[:swagger_document])
path_item = path_item_for(document, metadata[:swagger_path_item])
operation = operation_for(path_item, metadata[:swagger_operation])
response = response_for(operation, metadata[:swagger_response])
response_for(operation, metadata[:swagger_response])
end
def close(_notification)
......@@ -93,7 +93,7 @@ module RSpec
if examples["application/json"].present?
begin
examples["application/json"] = JSON.parse(examples["application/json"])
rescue JSON::ParserError => e
rescue JSON::ParserError
end
end
examples
......
......@@ -65,7 +65,7 @@ module RSpec
base_path = document[:basePath] || ''
# Find params in the path and replace them with values defined in
# 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
# `parameters` before fetch a value?
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