You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RSpec.describeCrepe::API,'versioning'docontext'with header'doappdoversionwith: :header,vendor: :pancake,default: :v2version:v1domountProc.new{[200,{'Content-Type'=>'text/plain'},['v1']]}endversion:v2domountProc.new{[200,{'Content-Type'=>'text/plain'},['v2']]}endmountProc.new{[200,{'Content-Type'=>'text/plain'},['v3']]},at: :v3endit'routes to several versions at the same path'doget'/',{},'HTTP_ACCEPT'=>'application/vnd.pancake-v2+json'expect(last_response.body).toinclude'v2'get'/',{},'HTTP_ACCEPT'=>'application/vnd.pancake-v1+json'expect(last_response.body).toinclude'v1'expect(get('/v3').body).toinclude'v3'endit'defaults to the specified version'doexpect(get('/').body).toinclude'v2'endendend
By using mount with a proc or Rack application from within a version declaration, the requested endpoints become 404s instead of routing to an app.
The text was updated successfully, but these errors were encountered:
Here's a failing spec:
By using
mount
with a proc or Rack application from within aversion
declaration, the requested endpoints become 404s instead of routing to an app.The text was updated successfully, but these errors were encountered: