turn-project/turn — pull request #135 by DWvanGeest (2014-05-16 21:39:45+00:00)
Title: Add tags option for only running tagged tests

Hi,

Not sure if there would be general interest in this feature or not, but we needed it.

This PR adds a `tags` option which limits the tests run to those which are tagged with at least one of the specified tags. It relies on https://github.com/wojtekmach/minitest-metadata to provide the tagging metadata, but if that gem is not installed, everything should still work (minus the tags option, obviously).

Additionally, if the user employs the long form of metadata with a non-truthy value (e.g. `quick: false`), this effectively turns off the tag. When the short form is used (e.g. `:quick`), `minitest-metadata` automatically fills in the value with `true`, so it works as you would expect.

It was not clear to me how such a feature should be unit tested, so I don't have any tests in this PR. I did, however, test it manually with our turn-based tests, and it worked as expected. Let me know if there's tests I should add somewhere.

Suggestions for improvements are welcome!

cc/ @jasonrwagner and @ring0lab