home.social

#minitest — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #minitest, aggregated by home.social.

  1. Hanami 프레임워크의 구조 개선과 미들웨어 제거: Continuations 2026/13

    Hanami::Action의 본문 파싱 로직을 개선하여 별도 설정 없이도 multipart 본문을 처리할 수 있게 되었으며, 이를 통해 기존의 불필요한 바디 파싱 미들웨어를 기본 앱 구성에서 완전히 제거했다.

    #hanami #minitest
    ruby-news.kr/articles/continua

  2. @getajobmike Most of that is nice stuff.

    I do disagree with special handling for `assert_equal(nil, obj)` tho. It means you cannot do table-based tests that include both `nil` and non-`nil` expected values.

    In my mind, there's nothing special about `nil`, this is enforcing an unnecessary opinion. Ryan Davis and Aaron Patterson insist, though github.com/minitest/minitest/i

    It's been deprecated for like 8 years, so this puts it to bed, at least.

    #ruby #minitest

  3. Made a small gem to allow switching from class to test - and back - in #zed

    github.com/MoskitoHero/zed-tes

    It’s still at an early stage, so I suspect it might not work in some projects. But it understands if you are using #rspec or #minitest.

    #ruby #gem

  4. You're using result #monads tested with #Minitest on #Ruby? Here are dead simple custom expectations to slap some rouge on your specs (or assertions). dev.to/svoop/mini-monads-2990

  5. RSpec is great, but I have a soft spot for #MiniTest. And let's be honest, it's a really great and valid choice for #Rails #tdd What do you think?

    dominickm.com/1658-2/

  6. @braidn @zenspider @Scottw This. I actually think minitest/spec is awesome, but it occasionally confounds me because I work so much in RSpec and there are just some things #MiniTest does differently from #RSpec. A "MiniTest for RSpec Refugees" how-to would be very useful to me, as there are lots of cases where RSpec is either too heavyweight or just plain annoying.

  7. Release 1116: #minitest version 5.22.0 has been released with some bug fixes and "did you mean" style errors if your `--name` arg doesn't match anything. cc @tenderlove

    zenspider.com/releases/2024/02

  8. @braidn @Scottw IMHO #RSpec is more powerful, but it's also more complicated. Plus, even though there were valid technical reasons, the move from `x.should ...` to `expect(x).to ...` and the tendency of some testers to rely too heavily on doubles and mocks rather than DAMP stubs or local modifications to *subject* make some easy tests difficult to grok.

    #MiniTest lacks some of the flexibility & expressiveness of RSpec. It's a trade-off, but for some things simplicity wins. YMMV.

  9. @ruralocity #RSpec has changed over the years (IMHO not always for the better) so more books about the latest versions and best practices would be something I'd like to see.

    On a separate note, someday I'd like to see someone do a transpiler for RSpec and #MiniTest specs. It's not really a fair comparison, but sometimes rewriting from one to the other because "legacy tests" and client preferences can have odd corner cases and MiniTest's slightly different syntax and focus on simplicity. (sigh)

  10. SUPER HAPPY to announce that #minitest v5.21.0 is out!

    In this release:

    + Added Minitest::Compress#compress and added it to UnexpectedError.
    + Added ability to initialize BacktraceFilter w/ custom regexp.
    + Optimized Assertion#location ~30%.
    + Output relative paths for all failures/errors/backtraces.
    and more!🎉😘

    zenspider.com/releases/2024/01

    (pls bump)

  11. Lots of good stuff going into #minitest today... Smarter faster better!

  12. People tell me how much easier to remember the ordering of rspec expectations:

    ```
    expect(actual).to eq(expected)
    ```
    ...still absolutely arbitrary ordering...

    Naming the wrapper of the "actual" value named `expect` seems beyond confusing. Why didn't rspec do it this way?:

    ```
    actual(act).to eq(expected(exp))
    ```

    That's why minitest/spec named it `value`:

    ```
    value(act).must_equal exp
    ```

    (tho I still prefer assertions, even in spec-style)

    #ruby #minitest

  13. Ever wanted to modify an ENV variable, an instance or class variable for the duration of a block or all tests of a group? This pattern emerged repeatedly in my suites and as I don’t like to bloat my spec helper, about time for the lightweight and dependency-free minitest-substitute gem. Drop cumbersome before and after handling with one or more easy to read `with "ENV['FOO']", "bar"` or `with "@run_at", on: Config { Time.now }` declarations. Happy testing! github.com/svoop/minitest-subs #ruby #minitest

  14. eso de los mundos debo configurtar y demas cosas pero tenemos servidor minetest de argentina.

    #server #minitest #argentina
    #telegram #game #minecraft

  15. If you are using Minitest, I think this gem could be very useful for simply running one single test:

    github.com/seattlerb/minitest-

    #Ruby #Testing #Minitest

  16. community, need a bit of help!

    I started with and am trying to stub Date.today. It works within the block, but not for another method invoked from within the block.

    Why?

    github.com/hirusi/miniflux-san