-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Given the following test:
shared_examples_for 'versioning' do
context 'with different versions for the same endpoint' do
context 'catch-all' do
before do
subject.version 'v1', macro_options
subject.get 'version' do
'v1'
end
subject.format :txt
subject.version 'v2', macro_options
subject.get 'version' do
'v2'
end
subject.route :any, '*path' do
error!('Not Found', 404)
end
end
it 'finds v1 of the endpoint' do
versioned_get '/version', 'v1', macro_options
expect(last_response.status).to eq(200)
expect(last_response.body).to eq('v1')
end
it 'finds v2 of the endpoint' do
versioned_get '/version', 'v2', macro_options
expect(last_response.status).to eq(200) # >>>>> This fails! Results in 404 <<<<<
expect(last_response.body).to eq('v2')
end
end
end
endFor even more context, see: master...zherr:multiple-endpoint-catchall
Before digging deeper into a fix I would like to gather feedback from contributors on whether this appears to be a bug, or if this behavior intentional.
Happy holidays!