Minitest no longer available in 2.2?

Hi,

I’m returning to Ruby and Hanami after a long while and wanted to start with a fresh 2.2 app. I noticed there is no option to go for minitest as s framework when creating a new app. Will there be in the future or is there a workaround?

best, seba

Hi @sebastjan_hribar, I’d love for us to have full minitest support!

This would be a fantastic opportunity for a contribution. It would involve taking GitHub - hanami/rspec: Hanami RSpec extensions and make a minitest equivalent. If you’re interested (or anyone else following along), I’d be very happy to support this.

Aside from this, the workaround in the meantime is just to take the RSpec setup from a new Hanami app and convert it over to minitest. If you do something like this, please do share it, because that would become a great reference for what an eventual hanami-minitest gem might generate :slight_smile:

I’d love to be able to use minitest too !

Hi @timriley , thank your prompt reply. I’d be happy to contribute, however, I’m not nearly as proficient as the rest of the community. I’m willing to learn though. I’ll start by getting familiar with 2.2 as is and then try to convert the RSpec setup to Minitest.
As for making the Minitest equivalent I’ll have to see. I have a lot of catching up to do. For the last year and a half or so I’ve been doing the so called vibe coding and now I’m paying the cost. :slight_smile: Since I’m not full time developer it’s affected me more than I’d like. I digress, but anyway, I’ll try and keep you updated.

Thank you all for the great work you do!

1 Like

My very incomplete pet project Hanami 2.2 app uses Minitest instead of RSpec. No generators, just specs written by hand.

There might be bits I can contribute to such an extension, however, I have too many balls in the air (online and offline) to play a major part here. So I’d rather follow a hanami/minitest repo and help out when occasions arise.

By the way: With Minitest, the first question which always pops up is whether to generate classic assert style tests or to use spec notation like _(subject.foo).must_equal "foo". Doesn’t make sense to support both I guess, so let my vote be the first for spec notation. :slight_smile:

  • spec notation: _(subject.foo).must_equal "foo"
  • test notation: assert_equal "foo", subject.foo
  • both (casting this vote makes you a mandatory contributor) :grinning_face:
0 voters

I’d also love to see us support Minitest again.

I think we should support both syntax options (spec and assertions). Hopefully we can abstract the implementation so it’s just about which class is being used to add the assertion, rather than having every spec file have a conditional to check which one is used.