Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A micro test "framework"
Ruby
tree: be0d28ed90

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
hacks
lib
.gitignore
README
Rakefile
VERSION
mtest.gemspec

README

    ‘‘ MTest ’’


MTest (stands for MicroTest) is a tiny and fast TDD framework.

It provides the Kernel#MTest method that takes an array of test as a parameter.

Need an example? Right.


  require 'mtest'
  
  tests = [
    "This is a simple test",
    ["Sum 40+2", proc {
      40 + 2
    }, 42]
  ]
  
  MTest(tests)

  
MTests returns a hash that represents the results of a test. Example!


  tests = [
    "This is a simple test",
    ["Sum 40+2", proc { 40 + 2 }, 42],
    
    "This one fails",
    ["FAIL", proc { true }, false]
  ]
  
  res = MTest(tests)
  
  res # => {:pass => 1, :err => 0, :fail => 1}
  
  
** Contributing **

Everyone is welcome to contribute to MTest. The only restriction is that
mtest.rb must be less than 51 lines long.

But feel free to submit your own tools, examples, hacks, etc.
Something went wrong with that request. Please try again.