How I write tests for my Rails (API) apps
I use RSpec for writing tests but my approach would have been similar with minitest as well. For every new API endpoint, I first write a simple request spec with the expectation of successful HTTP response.Request specs are RSpec's way of writing integration specs. They perform an actual HTTP request so that we can test an user interaction end to end.
How I write tests for my Rails (API) apps #ruby #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper