Skip to content

Commit 6b50ef2

Browse files
author
Jerry Cheung
committed
added failing spec for bug ruby-grape#86 Path based versioning not recognizing '/' route
1 parent ecbd664 commit 6b50ef2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/support/shared_versioning_examples.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
shared_examples_for "versioning" do
2+
it 'should version for the root path' do
3+
subject.version 'v1', macro_options
4+
subject.get do
5+
"Version: #{request.env['api.version']}"
6+
end
7+
versioned_get '/', 'v1', macro_options
8+
last_response.body.should eql "Version: v1"
9+
end
10+
211
it 'should set the API version' do
312
subject.version 'v1', macro_options
413
subject.get :hello do

0 commit comments

Comments
 (0)