Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Proof of concept minitest extension to add test marking.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 minitest-mark.gemspec
README.md

minitest-mark

This is an extension to minitest which adds the ability to use test marking. This feature is inspired by pytest's marks.

WARNING: This is a proof of concept. It works, but is not intended -- in its current form -- to be used for production tests.

Example

Defining And Running Marks

Define a test with some marks:

require "minitest/autorun"
require "minitest/unit"
require "minitest/mark"

class MyTest < MiniTest::Unit::TestCase
  mark("foo")
  def test_things
    assert true
  end

  mark("bar")
  def test_other
    assert true
  end
end

Run them like normal and they'll run, like normal:

$ ruby my_test.rb
Started
..
Finished in 0.000743 seconds.

2 tests, 2 assertions, 0 failures, 0 errors, 0 skips

Run with MARK environmental variable to target only select marks:

$ MARK=foo ruby my_test.rb
Started
.
Finished in 0.000533 seconds.

1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
Something went wrong with that request. Please try again.