github
127 of 127 new or added lines in 1 file covered. (100.0%)
14100 of 14223 relevant lines covered (99.14%)
183.83 hits per line
| 1 |
# frozen_string_literal: true
|
|
| 2 |
|
|
| 3 |
# see https://github.com/ruby-grape/grape/issues/1348
|
|
| 4 |
|
|
| 5 |
def namespace |
70✔ |
| 6 |
raise |
× |
| 7 |
end
|
|
| 8 |
|
|
| 9 |
describe Grape::API do |
70✔ |
| 10 |
subject do
|
70✔ |
| 11 |
Class.new(Grape::API) do |
70✔ |
| 12 |
format :json
|
70✔ |
| 13 |
get do
|
70✔ |
| 14 |
{ ok: true }
|
70✔ |
| 15 |
end
|
|
| 16 |
end
|
|
| 17 |
end
|
|
| 18 |
|
|
| 19 |
def app |
70✔ |
| 20 |
subject |
70✔ |
| 21 |
end
|
|
| 22 |
|
|
| 23 |
context 'with a global namespace function' do |
70✔ |
| 24 |
it 'works' do |
70✔ |
| 25 |
get '/'
|
70✔ |
| 26 |
expect(last_response.status).to eq 200
|
70✔ |
| 27 |
end
|
|
| 28 |
end
|
|
| 29 |
end
|