Avoiding Network Calls In Rails Tests Without Using Mocks, Stubs or VCR - Code with Jason
15-Nov-2018 1880
An important principle of testing is that tests should be deterministic. The passing or failing of a test shouldn’t depend on the date it was run, whether any certain other tests ran before it, or whether some condition outside the application changed.If a test hits an external URL then it’s susceptible to being non-deterministic. I’ll give you an example from something I was working on today.
Avoiding Network Calls In Rails Tests Without Using Mocks, Stubs or VCR - Code with Jason #ruby #rubydeveloper #rubyonrails #Avoiding #Network #Calls #Rails #Tests #Without #Using #Mocks, #Stubs #Jason #code #tests https://rubyonrails.ba/link/avoiding-network-calls-in-rails-tests-without-using-mocks-stubs-or-vcr-code-with-jason