Skip to content

Commit

Permalink
fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
dorner committed Sep 12, 2024
1 parent 6f60015 commit b578284
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/gruf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require_relative './test_service_services_pb'
require 'gruf'

class ServerImpl < Gruf::Controllers::Base
class GrufServerImpl < Gruf::Controllers::Base

bind ::Testdata::MyService::Service

Expand All @@ -27,7 +27,7 @@ def test_4

class TestInterceptor < ::Gruf::Interceptors::ServerInterceptor
def call
ServerImpl.intercepted = true
GrufServerImpl.intercepted = true
yield
end
end
Expand All @@ -37,15 +37,15 @@ def call
RSpec.describe MyServiceController, type: :request do
describe 'using get' do
it 'should be successful and call interceptors' do
ServerImpl.intercepted = false
GrufServerImpl.intercepted = false
get "/test/blah/xyz?test_id=abc"
expect(response).to be_successful
expect(response.parsed_body).to eq({
'someInt' => 1,
'fullResponse' => %({"testId":"abc","foobar":"xyz"}),
"ignoredKey" => ''
})
expect(ServerImpl.intercepted).to eq(true)
expect(GrufServerImpl.intercepted).to eq(true)
end
end
end

0 comments on commit b578284

Please sign in to comment.