https://github.com/mitchellh/minitest-mark
Proof of concept minitest extension to add test marking.
https://github.com/mitchellh/minitest-mark
Last synced: 8 months ago
JSON representation
Proof of concept minitest extension to add test marking.
- Host: GitHub
- URL: https://github.com/mitchellh/minitest-mark
- Owner: mitchellh
- Created: 2011-09-15T18:42:32.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-09-15T19:15:27.000Z (over 14 years ago)
- Last Synced: 2025-04-10T05:59:26.156Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 93.8 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# minitest-mark
This is an extension to [minitest](https://github.com/seattlerb/minitest)
which adds the ability to use test marking. This feature is inspired by
[pytest's marks](http://pytest.org/latest/mark.html).
**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:
```ruby
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