How I write tests for my Rails (API) apps
30-Jul-2020 1503
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 #rubydeveloper #rubyonrails #write #tests #Rails #(API) #tests https://rubyonrails.ba/link/how-i-write-tests-for-my-rails-api-apps