Sha256: 4221b7c761d86520ec9cd69c77982cd3c52ce6754ca40e52dbb904e4dc5c5f71
Contents?: true
Size: 388 Bytes
Versions: 13
Compression:
Stored size: 388 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe 'A named API' do subject(:api_name) { NamedAPI.endpoints.last.options[:for].to_s } let(:api) do Class.new(Grape::API) do get 'test' do 'response' end end end before { stub_const('NamedAPI', api) } it 'can access the name of the API' do expect(api_name).to eq 'NamedAPI' end end
Version data entries
13 entries across 13 versions & 2 rubygems