Sha256: ca9aec24af4baa8dc265737f1f03eace8267b07689755c4b2ae9b72b414f9178
Contents?: true
Size: 485 Bytes
Versions: 16
Compression:
Stored size: 485 Bytes
Contents
# frozen_string_literal: true 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
16 entries across 16 versions & 2 rubygems