I have a router something like:
get '/images', to: 'images.index'
post '/images', to: 'images.upload'
get '/images/:id', to: 'images.show'
post '/images/bulk', to: 'images.upload'
My tool analyses Hanami apps using router.recognize.
I noticed that recognize method returns a RecognizedRoute whose verb is always GET even for POST or other methods.
route = router.recognize("/images/bulk", method: "POST")
expect(route.routable?).to be(true)
expect(route.verb).to eq("POST") # => GET returned 😱
Repro
Clone #270
And run bundle exec rspec.