Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
97 lines (66 sloc) 2.12 KB


fastest is a testing framework written in 6 lines of code (or 473 characters) which tries to be performant, with eye-catchy reports and easy to use.

Originally named a, the name was too much for Google so I changed it.

Heavily inspired by Konstantin Haase's almost-sinatra, its long-term purpose is to become the fastest testing framework available.

In order to contribute to fastest, you have to bear in mind that the code must stay under 7 lines and with less than 80 chars per line. There is room for optimization.

In case more sophisticated behavior was needed, it could be included as an optionally loadable addon. An example of this is fastest/parallel, an addon that enables your tests to run in parallel, which means faster.


  • Setup / Teardown
  • Assertions (using the a method)
  • Report tests/assertions/failures
  • Keep track of lines where failures happened


$ gem install fastest

Or in your Gemfile:

gem 'fastest'


  • Require fastest/parallel in your test helper or suite to run your tests in parallel.


require 'fastest'

# Every test case must inherit from the A class
class MyTestCase < A
  def setup
    @user = { :some => :object }

  def test_user_has_property
    a @user[:some] == :object
    a !@user[:other]

  def teardown
    @user = nil

class MyOtherTestCase < A
  def setup
    @foo = [1,2,3]

  def test_user_has_property
    a @foo.length == 3
    a @foo[2] > 934 # Should fail at line 27

    @foo[1] = 99

    a @foo[1] != 2

  def teardown
    @bar = :something

And voilà:



fastest has no automated tests nor documentation, and I will have to turn down any pull request that contains those, unless the tests are written in fastest itself.


Copyright (c) 2011 Josep M. Bach. Released under the MIT license.