Library for stubbing and setting expectations on HTTP requests in Ruby.
We can avoid managing HTTP communication with our dependency. Instead, we'll stub out how we expect it to respond. In this case, we'll use webmock to stub out a response at the HTTP layer.
Spin up an external server just for Capybara
We can use the FakeWeather API rather than the real one using a tool like capybara_discoball.
Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.
We'll use a tool called vcr to capture real HTTP requests and responses, storing and using them from then on. VCR's language and terminology leans heavily into its real-world analogue. If you don't know what a VCR is, it's a box we used to hook up to TVs to watch movies before DVD players. If you don't know what a DVD player is, it's a box we used to hook up to TVs to watch movies before streaming.
Configure VCR with RSpec
2 projects | dev.to | 23 Jul 2022
Testing external APIs with Rspec and WebMock
4 projects | dev.to | 16 Apr 2021
looking for resources for learning unit testing in go?
1 project | reddit.com/r/golang | 12 Aug 2022
Unit Testing a Grom Application With a Real DB Server
3 projects | reddit.com/r/golang | 27 Jul 2022
how to fake a response of an external server/api for a laravel feature test?
2 projects | reddit.com/r/laravel | 25 Jul 2022