Sha256: 6878b142245e5e082e62a680c7a0c38c01f8dd551a5cddde315b2a956b0671b5

Contents?: true

Size: 451 Bytes

Versions: 13

Compression:

Stored size: 451 Bytes

Contents

# frozen_string_literal: true

# see https://github.com/ruby-grape/grape/issues/1348

require 'spec_helper'

def namespace
  raise
end

describe Grape::API do
  subject do
    Class.new(Grape::API) do
      format :json
      get do
        { ok: true }
      end
    end
  end

  def app
    subject
  end

  context 'with a global namespace function' do
    it 'works' do
      get '/'
      expect(last_response.status).to eq 200
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
grape-1.6.2 spec/grape/integration/global_namespace_function_spec.rb
grape-1.6.1 spec/grape/integration/global_namespace_function_spec.rb
grape-1.6.0 spec/grape/integration/global_namespace_function_spec.rb
grape-1.5.3 spec/grape/integration/global_namespace_function_spec.rb
grape-1.5.2 spec/grape/integration/global_namespace_function_spec.rb
grape-1.5.1 spec/grape/integration/global_namespace_function_spec.rb
grape-1.5.0 spec/grape/integration/global_namespace_function_spec.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/grape-1.4.0/spec/grape/integration/global_namespace_function_spec.rb
grape-1.4.0 spec/grape/integration/global_namespace_function_spec.rb
grape-1.3.3 spec/grape/integration/global_namespace_function_spec.rb
grape-1.3.2 spec/grape/integration/global_namespace_function_spec.rb
grape-1.3.1 spec/grape/integration/global_namespace_function_spec.rb
grape-1.3.0 spec/grape/integration/global_namespace_function_spec.rb