Commit 64cd524
committed
Fix spurious warnings in tests when using Rack 3.1
These warnings are of the form:
```
warning: input stream used for POST parsing different from current input
stream. Starting in Rack 3.2, Rack will used the cached POST value
instead of parsing the current in put stream.
```
These warnings are spurious, because tests don't fail on the rack
master branch. They occur because the requests inside the FAKE_APP
used in the tests have rack.input as a Rack::Lint:InputWrapper
instance, while the InputRewinder used in the tests replaces this
with the original instance after receiving the response. Then when
last_request.POST is called after the request, you get the warning
because rack.request.form_input doesn't match rack.input.
Deleting rack.request.form_hash from the environment fixes this.
The tests that call last_request.POST will reparse the input body
instead of using the cached input, but that doesn't seem like a
problem.1 parent e5e9d89 commit 64cd524
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
0 commit comments