How environment variables make your Ruby test suite flaky

Lots of apps use environment variables to manage environment-specific config. For example, an app might use environment variables to set 3rd party API keys. Or an app might use environment variables to toggle features on and off. Since environment variables are so commonly used, we’ll eventually want to test code that depends on these environment variables. And if we’re not careful, these tests can make our Ruby test suites flaky—tests that should be passing will randomly fail for unexpected reasons.Testing code that depends on environment variablesFor example, imagine we have a StringMultiplier class. New instances are initialized with a string, and there’s a .
How environment variables make your Ruby test suite flaky #ruby #rubydeveloper #rubyonrails #environment #test https://rubyonrails.ba/single/how-environment-variables-make-your-ruby-test-suite-flaky

Nezir Zahirovic

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

related articles