Skip to content

Commit f4e5508

Browse files
authored
Merge pull request #3 from stitchfix/nil-dot-rewind-errors
Fallback to StringIO to prevent nil.rewind errors
2 parents 8635155 + 712c228 commit f4e5508

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rspec_api_documentation/client_base.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def process(method, path, params = {}, headers ={})
4444
end
4545

4646
def read_request_body
47-
input = last_request.env["rack.input"]
47+
input = last_request.env["rack.input"] || StringIO.new
4848
input.rewind
4949
input.read
5050
end

0 commit comments

Comments
 (0)