Sha256: 50e218a8515f2e1e183a8a4e87d31adfaccf2de6e0b1f27add989958abac1967
Contents?: true
Size: 365 Bytes
Versions: 3
Compression:
Stored size: 365 Bytes
Contents
# frozen_string_literal: true 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
grape-1.8.0 | spec/grape/named_api_spec.rb |
grape-1.7.1 | spec/grape/named_api_spec.rb |
grape-1.7.0 | spec/grape/named_api_spec.rb |