spec/support/route_matcher_helpers.rb in grape-route-helpers-1.0.1 vs spec/support/route_matcher_helpers.rb in grape-route-helpers-1.2.0
- old
+ new
@@ -6,10 +6,14 @@
Class.new(Grape::API) do
version 'v1'
prefix 'api'
format 'json'
+ get 'custom_name', as: :my_custom_route_name do
+ 'hello'
+ end
+
get 'ping' do
'pong'
end
resource :cats do
@@ -25,9 +29,15 @@
end
route :any, '*path' do
'catch-all route'
end
+ end
+ end
+
+ def self.mounting_api
+ Class.new(Grape::API) do
+ mount Spec::Support::RouteMatcherHelpers.api
end
end
end
end
end