Sunday, December 30, 2007

unit testing ruby




Expectations is a new unit testing library for Ruby.

Some very interesting ideas in there, a couple simple examples from their webpage are:


expect 2 do
1 + 1
end

expect NoMethodError do
Object.invalid_method_call
end


I like that, that's pretty readable.