Sha256: 00b45e167f5b263e14ec88cc4f071143c67297010f24bcbd6a47d01416f03581
Contents?: true
Size: 454 Bytes
Versions: 28
Compression:
Stored size: 454 Bytes
Contents
module Spec module Support class EndpointFaker class FakerAPI < Grape::API get '/' do end end def initialize(app, endpoint = FakerAPI.endpoints.first) @app = app @endpoint = endpoint end def call(env) @endpoint.instance_exec do @request = Grape::Request.new(env.dup) end @app.call(env.merge('api.endpoint' => @endpoint)) end end end end
Version data entries
28 entries across 28 versions & 2 rubygems