Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (48 sloc) 2.05 KB
NAME
testy.rb
DESCRIPTION
a minimalist BDD testing framework for ruby that's mad at the world and
plans to kick its ass by ruthlessly removing lines of testing framework
code
SYNOPSIS
Testy.testing 'your code' do
test 'some behaviour' do |t|
ultimate = Ultimate.new
t.check :name, :expect => 42, :actual => ultimate.answer
end
end
GIT
open http://github.com/ahoward/testy/tree/master
git clone git://github.com/ahoward/testy.git
PRINCIPLES AND GOALS
. it.should.not.merely.be.a.unit.testing.with.a.clever.dsl
. testing should not require learning a framework. ruby is a great
framework so testy uses it instead, requiring programmers learn exactly 2
new method calls
. testing loc should not dwarf those of the application
. testing framework loc should not dwarf those of the application
. testing frameworks should *never* alter ruby built-ins nor add methods to
Object, Kernel, .et al
. the output of tests should be machine parsable for reporting and ci tools
to easily integrate with
. the output of tests should be beautiful so that humans can read it
. the shape of the test file should not insult the programmer so that tests
can double as sample code
. the testing framework should never alter exception semantics
. hi-jacking at_exit sucks ass
. the exit status of running a test suite should indicate the degree of it's
failure state (testy returns the percent of failed tests using a non-zero
exit status)
. sample code should easily be able to double as a test suite, including
its output
. testing should improve your code and help your users, not make you want to
kill yourself
. using a format that aligns in terminal is sanity saving when comparing
output
. testing frameworks should provide as few shortcuts for making brittle
tightly coupled tests as possible
. test suites should be able to be created, manipulated, have their output
streamed to different ports, and even tested themselves - they should be
plain ol objects under the hood
SAMPLES
@samples