Giter Club home page Giter Club logo

microtest's Introduction

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.

microtest's People

Contributors

trans avatar

Stargazers

Noriyo Akita avatar Stephen Becker IV avatar

Watchers

 avatar James Cloos avatar  avatar

microtest's Issues

Require RubyTest

Reports an error it rubytest command isn't used to run tests. Probably need to require rubytest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.