Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

microtest

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

microtest

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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.

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.

FAQs

Package last updated on 04 Mar 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc