Skip to content
forked from digivizer/gcr

A VCR-like test helper for Ruby GRPC clients

License

Notifications You must be signed in to change notification settings

binti-family/gcr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GCR

A VCR-like test helper for GRPC clients.

Example

# in some test initializer
GCR.cassette_dir = Rails.root.join("test/fixtures/my_grpc_service")
GCR.stub = MyGRPCServer.stub
# in your test code
test "MyController#index works" do
  GCR.with_cassette("some cassette name") do
    MyGRPCServer.do_something
  end
end

Configuration

To not save empty requests (for instance when error occur), set save_empty_requests as false.

GCR.save_empty_requests = false

Tests

To run tests:

bundle exec rake

About

A VCR-like test helper for Ruby GRPC clients

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 98.6%
  • Shell 1.4%