Running minitest with zeus

Since minitest is supposed to be the new default in Rails 4, and I am really
fund of it I recently switched a pet project of mine over. One problem I ran
into was using zeus to speed up my test flow. So there are a couple of things to
look out for when using zeus with minitest-rails.

Rake and zeus don’t match

In most cases when using minitest people will run their tests via rake. This
actually makes a lot of sense normally since rake offers even a special test
task for it, but with zeus we have a different story here. Since rake will
actually load in the environment when running the tests, you don’t actually get
a lot of benefits when running via zeus, so make sure you run your tests via the
provided test task from zeus, which is base on m.

My tests run twice?

Minitest installs a test runner, at the exit hook of the ruby process, so your
tests will run, and then they run on exit again. This is weird, and should only
happen when autorun is required but somewhere deep in rails this is done, so you
need to make sure it doesn’t happen. There is a nice discussion around this
issue with some proposed fixes here
as well as a pull request by me.

So here you go enjoy minitest and zeus

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.