Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Super simple Ruby testing library

tree: 8a48b4ee95

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore Initial import August 10, 2011
Octocat-spinner-32 Gemfile Initial import August 10, 2011
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 testrocket.gemspec
README.md
 _            _                  _         _   
| |_  ___ ___| |_ _ __ ___   ___| | __ ___| |_ 
| __|/ _ | __| __| '__/ _ \ / __| |/ // _ \ __|
| |_|  __|__ \ |_| | | (_) | (__|   <|  __/ |_ 
 \__|\___|___/\__|_|  \___/ \___|_|\_\\___|\__|

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

It was initially developed for this CodeBrawl competition and it won! People then asked me to release it 'for real' so here we are.

To install:

gem install testrocket

Dependencies

Ruby 1.9. That's it. It'll probably work on Ruby 1.8 if you use 1.8 lambda syntax but I haven't tried it and you shouldn't be using 1.8 anymore anyway ;-)

Example

require 'testrocket'

# ===========================================================
# EXAMPLE TEST "SUITE" FOR "DIE"
#
# USAGE
# +-> { block that should succeed }
# --> { block that should fail }

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

# These two tests will deliberately fail
+-> { raise }
--> { true }
Something went wrong with that request. Please try again.