Avoiding Network Calls In Rails Tests Without Using Mocks, Stubs or VCR - Code with Jason

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 #code #tests https://www.rubyonrails.ba/single/avoiding-network-calls-in-rails-tests-without-using-mocks-stubs-or-vcr-code-with-jason

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles