I don't know where you get this, maybe start-up land. I have been a dev since the early '90's and all kinds of enterprises do drug testing. Most utilities, health-related organizations, defense contractors, transportation businesses and even many large manufacturers routinely drug test potential employees. Most only test for pre-employment screening, but random testing is still used in many places.
Most recently, three years ago, I was tested for a contracting gig at a Wisconsin power company for a web dev job.