Sha256: bf576f66f1a63ddf3563035ef045282974cd86f50b812c18a120ceb16d818c57

Contents?: true

Size: 1.63 KB

Versions: 1

Compression:

Stored size: 1.63 KB

Contents

     _            _                  _         _
    | |_  ___ ___| |_ _ __ ___   ___| | __ ___| |_
    | __|/ _ | __| __| '__/ _ \ / __| |/ // _ \ __|
    | |_|  __|__ \ |_| | | (_) | (__|   <|  __/ |_
     \__|\___|___/\__|_|  \___/ \___|_|\_\\___|\__|

Testrocket is a super simple (as simple as it gets really) testing library for Ruby 1.9 and higher.

It was initially developed for [a CodeBrawl contest](http://codebrawl.com/articles/contest-rundown-ruby-testing-libraries) and it won! People asked me to release it 'for real' so here we are.

To install:

    gem install testrocket

As yet there are no useful bits and pieces for creating test files (look at the example, it's easy!) or Rake tasks. But it's all crazy simple. A few things may be added later on.

Dependencies
------------

- Ruby 1.9 or higher
- minitest/spec (part of MRI 1.9+ standard library)

Example
-------

```ruby
require 'testrocket'

# BASIC USAGE
# +-> { block that should succeed }
# --> { block that should fail }

+-> { Die.new(2) }
--> { raise }
+-> { 2 + 2 == 4 }

# These two tests will deliberately fail
+-> { raise }
--> { true }

# A 'pending' test
~-> { "this is a pending test" }

# A description
!-> { "use this for descriptive output and to separate your test parts" }
```

Other Features
--------------

By default, output is written to STDOUT (as well as returned by the test expressions themselves). You can override where test output goes like so:

```ruby
TestRocket.out = File.new('/dev/null', 'w')
```

TestRocket.out also supports Logger instances.

Authors
-------

Initial concept and maintenance by Peter Cooper

Extra concepts and code by Christoph Grabo

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
testrocket-0.0.2 README.md