Hacker News new | past | comments | ask | show | jobs | submit login
The TLDR on Ruby's new TLDR testing framework (testdouble.com)
19 points by thunderbong on Oct 4, 2023 | hide | past | favorite | 4 comments



This really excites me, I’ve not seen much innovation in the testing space for a while now.

Please add support for a spec based dsl so all of us rspec fans may make the transition across with much less pain.

Along the lines of minitest spec

https://docs.ruby-lang.org/en/2.0.0/MiniTest/Spec.html


Please, please don’t. The rspec syntax has been cargo culted along for far too long, and it provides nothing except cutesy, confusing syntax.

I say this as someone who has been writing Ruby professionally for something like fifteen years. I used rspec for maybe eight of them. I understand the rspec DSL syntax fully and have no problem writing tests in it. But it should not exist.

The only real, valuable thing it brought to the ecosystem was scopes/contexts. Other testing frameworks have that, and there is nothing left but an insane amount of inertia that keeps it going.


As much as the author calls themself out in the subtitle, they do lead with the actual "TLDR".

> It’s called TLDR and it blows up if your tests take more than 1.8 seconds to run.

> The big idea is to run as much of your test suite as you can as often as you can, as opposed to only running whatever test you’re actively working on and saving the full test suite for CI.

The stated objective sounds nice. I have no idea how sensible or thought-out the 1.8 seconds decision is but keeping the whole suite at less than 2 seconds "feels right" as it were, especially in a CI/CD context. Probably most valuable is setting some timeout and ideally setting it as low as possible.


This is a really cool idea. Anyone know of any similar frameworks for JavaScript/Typescript?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: