| ▲ | pmontra 4 hours ago | |||||||||||||||||||||||||
> In Elixir tests, each test runs in a database transaction that rolls back at the end. Tests run async without hitting each other. No test data persists. And it confuses Claude. This way of running tests is also what Rails does, and AFAIK Django too. Tests are isolated and can be run in random order. Actually, Rails randomizes the order so if the are tests that for any reason depend on the order of execution, they will eventually fail. To help debug those cases, it prints the seed and it can be used to rerun those tests deterministically, including the calls to methods returning random values. I thought that this is how all test frameworks work in 2026. | ||||||||||||||||||||||||||
| ▲ | netghost 3 hours ago | parent | next [-] | |||||||||||||||||||||||||
I did too, and I've had a challenging time convincing people outside of those ecosystems that this is possible, reasonable, we've been doing it for over a decade. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| ▲ | vmg12 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||
Why not just write to the db? Just make every test independent, use uuids / random ids for ids. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| ▲ | 2 hours ago | parent | prev [-] | |||||||||||||||||||||||||
| [deleted] | ||||||||||||||||||||||||||