Skip to content

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…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
Gemfile
LICENSE
README.md
Rakefile
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.