Skip to content

Commit cfc1841

Browse files
idyllTim Vandecasteele
authored andcommitted
Updated specs to deal with versioned APIS
1 parent 4df92af commit cfc1841

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spec/grape-swagger-helper_spec.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ class HelperTestAPI < Grape::API
4848
context "parsing the path" do
4949
it "should parse the path" do
5050
path = ":abc/def(.:format)"
51-
@api.parse_path(path).should == "{abc}/def.{format}"
51+
@api.parse_path(path, nil).should == "{abc}/def.{format}"
52+
end
53+
54+
it "should parse the path with a specified version" do
55+
path = ":abc/{version}/def(.:format)"
56+
@api.parse_path(path, 'v1').should == "{abc}/v1/def.{format}"
5257
end
5358
end
5459

0 commit comments

Comments
 (0)