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