Project

microtest

0.0
No commit activity in last 3 years
No release in over 3 years
MicroTest is a very small Test::Unit/MiniTest compatbile test framework that runs on top of RubyTest, a Universal Test Harness for Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

MicroTest

Gem Version Build Status     Flattr Me

Website · API · Report Issue · Source Code

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.

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.

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 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.