{"id":13878754,"url":"https://github.com/qrush/m","last_synced_at":"2025-05-15T05:00:16.238Z","repository":{"id":2106572,"uuid":"3048087","full_name":"qrush/m","owner":"qrush","description":"A Test::Unit runner that can run tests by line number.","archived":false,"fork":false,"pushed_at":"2023-09-17T11:53:12.000Z","size":383,"stargazers_count":381,"open_issues_count":12,"forks_count":57,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-14T05:57:01.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qrush.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2011-12-25T13:33:56.000Z","updated_at":"2025-03-22T21:28:32.000Z","dependencies_parsed_at":"2023-01-13T11:38:13.773Z","dependency_job_id":"fa265dc0-95b6-4919-9dd8-84f8a9ad82ee","html_url":"https://github.com/qrush/m","commit_stats":{"total_commits":158,"total_committers":31,"mean_commits":5.096774193548387,"dds":0.6329113924050633,"last_synced_commit":"c86bf774f7daa5c3ea32e1f9597171fe30004e3e"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qrush%2Fm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qrush%2Fm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qrush%2Fm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qrush%2Fm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qrush","download_url":"https://codeload.github.com/qrush/m/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276444,"owners_count":22043866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T08:01:58.868Z","updated_at":"2025-05-15T05:00:16.162Z","avatar_url":"https://github.com/qrush.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"M.RB\n\n[![Gem Version](https://badge.fury.io/rb/m.svg)](https://rubygems.org/gems/m) [![Code Climate](https://codeclimate.com/github/qrush/m.svg)](https://codeclimate.com/github/qrush/m) [![Build Status](https://travis-ci.org/qrush/m.svg?branch=master)](https://travis-ci.org/qrush/m) [![Coverage Status](https://coveralls.io/repos/qrush/m/badge.svg?branch=master)](https://coveralls.io/r/qrush/m)\n\n\n----\n\n`m` stands for metal, a better test/unit and minitest test runner that can run tests by line number.\n\nINSTALL\n=======\n\nInstall via:\n\n\n    $ gem install m\n\n\nIf you’re using Bundler, you’ll need to include it in your Gemfile. Toss it into the test group:\n\n``` ruby\ngroup :test do\n  gem \"m\"\nend\n```\n\nUSAGE\n=====\n\nBasically, I was sick of using the -n flag to grab one test to run. Instead, I prefer how RSpec’s test runner allows tests to be run by line number.\n\nGiven this file:\n\n\n    $ cat -n test/example_test.rb\n     1  require 'test/unit'\n     2\n     3  class ExampleTest \u003c Test::Unit::TestCase\n     4    def test_apple\n     5      assert_equal 1, 1\n     6    end\n     7\n     8    def test_banana\n     9      assert_equal 1, 1\n    10    end\n    11  end\n\n\nYou can run a test by line number, using format m TEST_FILE:LINE_NUMBER_OF_TEST:\n\n\n    $ m test/example_test.rb:4\n    Run options: -n /test_apple/\n\n    # Running tests:\n\n    .\n\n    Finished tests in 0.000525s, 1904.7619 tests/s, 1904.7619 assertions/s.\n\n    1 tests, 1 assertions, 0 failures, 0 errors, 0 skips\n\n\nHit the wrong line number? No problem, m helps you out:\n\n\n    $ m test/example_test.rb:2\n    No tests found on line 2. Valid tests to run:\n\n     test_apple: m test/examples/test_unit_example_test.rb:4\n    test_banana: m test/examples/test_unit_example_test.rb:8\n\n\nWant to run the whole test? Just leave off the line number.\n\n\n    $ m test/example_test.rb\n    Run options:\n\n    # Running tests:\n\n    ..\n\n    Finished tests in 0.001293s, 1546.7904 tests/s, 3093.5808 assertions/s.\n\n    1 tests, 2 assertions, 0 failures, 0 errors, 0 skips\n\nIf you want to run all the tests in a directory as well as its subdirectories, use the `-r` flag:\n\n    $ m -r test/models\n    \"Searching provided directory for tests recursively\"\n    Run options:\n\n    ..\n\n    Finished in 3.459902s, 45.0880 runs/s, 87.5747 assertions/s.\n\n    156 tests, 303 assertions, 0 failures, 0 errors, 13 skips\n\nIf you need to pass some option down to the actual runner, that is also supported:\n\n    $ m test/models -- --seed 1234\n    Run options: --seed 1234\n\n    ..\n\n    Finished in 3.459902s, 45.0880 runs/s, 87.5747 assertions/s.\n\n    156 tests, 303 assertions, 0 failures, 0 errors, 13 skips\n\nEnsure that you use the `--` before the options, otherwise you'll get an invalid option error. Also, these extra option should always be the last argument.\n\n\nSUPPORT\n=======\n\n`m` works with a few Ruby test frameworks:\n\n  - Test::Unit\n  - ActiveSupport::TestCase\n  - MiniTest::Unit::TestCase\n  - Minitest\n\n\nCONTRIBUTING\n============\n\n## Testing\n\nYou can run all the tests with:\n\n    bundle exec rake tests\n\nYou can also run tests selectively. For minitest 4 run:\n\n    bundle exec rake test:minitest4\n\nand the ones for minitest 5 with:\n\n    bundle exec rake test:minitest5\n\n\nLICENSE\n=======\n\nThis gem is MIT licensed, please see LICENSE for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqrush%2Fm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqrush%2Fm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqrush%2Fm/lists"}