1Minimum Test Framework for mruby 2========= 3 4[![Build Status](https://travis-ci.org/iij/mruby-mtest.svg?branch=master)](https://travis-ci.org/iij/mruby-mtest) 5 6## example 7```ruby 8class Test4MTest < MTest::Unit::TestCase 9 def test_assert 10 assert(true) 11 assert(true, 'true sample test') 12 end 13end 14 15MTest::Unit.new.run 16``` 17 18### How to use mrbgem's mrbtest 19```ruby 20if Object.const_defined?(:MTest) 21 class Test4MTest < MTest::Unit::TestCase 22 def test_assert_nil 23 assert_nil(nil, 'nil sample test') 24 end 25 end 26 27 if $ok_test 28 MTest::Unit.new.mrbtest 29 else 30 MTest::Unit.new.run 31 end 32else 33 $asserts << "test skip of Test4MTest." if $asserts 34end 35``` 36 37## TODO 38 39 - MiniTest::Unit.autorun is not implemented (because mruby hasn't ``at_exit`` method.) 40 41 42## License 43 44Copyright (c) 2013 Internet Initiative Japan Inc. 45 46Permission is hereby granted, free of charge, to any person obtaining a 47copy of this software and associated documentation files (the "Software"), 48to deal in the Software without restriction, including without limitation 49the rights to use, copy, modify, merge, publish, distribute, sublicense, 50and/or sell copies of the Software, and to permit persons to whom the 51Software is furnished to do so, subject to the following conditions: 52 53The above copyright notice and this permission notice shall be included in 54all copies or substantial portions of the Software. 55 56THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 57IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 58FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 59AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 60LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 61FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 62DEALINGS IN THE SOFTWARE. 63 64