https://github.com/rubyworks/microtest
Microminal Test::Unit/MiniTest Compatible Test Framework
https://github.com/rubyworks/microtest
Last synced: 11 months ago
JSON representation
Microminal Test::Unit/MiniTest Compatible Test Framework
- Host: GitHub
- URL: https://github.com/rubyworks/microtest
- Owner: rubyworks
- License: other
- Created: 2011-08-11T16:48:07.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2013-03-10T21:42:06.000Z (almost 13 years ago)
- Last Synced: 2025-03-10T14:43:24.727Z (11 months ago)
- Language: Ruby
- Homepage: http://rubyworks.github.com/microtest
- Size: 145 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: License.txt
Awesome Lists containing this project
README
# MicroTest
[](http://badge.fury.io/rb/microtest)
[](http://travis-ci.org/rubyworks/microtest)
[](http://flattr.com/thing/324911/Rubyworks-Ruby-Development-Fund)
[Website](http://rubyworks.github.com/microtest) ·
[API](http://rubydoc.info/gems/microtest) ·
[Report Issue](http://github.com/rubyworks/microtest/issues) ·
[Source Code](http://github.com/rubyworks/microtest)
## Description
MicroTest is a minimal Test::Unit and MiniTest compatible
test framework that runs on top of Ruby Test.
## Installation
Using Rubygems:
$ gem install microtest
## Instruction
Tests are written in the same manner as they are for Ruby's
traditional test framework(s). The only significant difference
is that an assertions framework library needs to be required
along with the test library itself. MicroTest comes with a
traditional assertions system for backward compatability
with TestUnit and MiniTest. Simply require `microtest/assertion`
to get it. Alternatively any BRASS compliant assertion framework
can be used.
```ruby
require 'microtest'
require 'microtest/assertions'
class ExampleTest < MicroTest::TestCase
#
def setup
@a = 1
end
#
def test_alpha_is_one
assert_equal(1, @a)
end
end
```
For drop in compatibility with Test::Unit, load `microtest/testunit`.
```ruby
require 'microtest/testunit'
require 'microtest/assertions'
class ExampleTest < Test::Unit::TestCase
...
end
```
To run tests use the `rubytest` command line utility.
$ rubytest -Ilib test/test_example.rb
See [RubyTest](http://rubyworks.github.com/rubytest) for more details on this.
## License
Copyright (c) 2011 Rubyworks
MicroTest is distributes under the terms of the **FreeBSD** license.
See License.txt for details.