svoop · @svoop
2 followers · 36 posts · Server ruby.social

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

Last updated 1 year ago

Lee Capps · @jlcapps
57 followers · 81 posts · Server mastodon.sdf.org

Today I learned that MiniTest was renamed to Minitest -- 10 years ago!

github.com/minitest/minitest/c

#ruby #minitest

Last updated 1 year ago

Lucian Ghinda · @lucian
401 followers · 467 posts · Server ruby.social

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

Last updated 2 years ago