From: Farrel Lifson Date: 2006-03-17T20:02:24+09:00 Subject: Re: Q: variable "declarations" I would suggest unit tests using the Test::Unit API which comes standard with ruby these days. C:\>more test.rb require 'test/unit' def do_something result = 1 # some code... reslt = 2 # a typo here!!! result end class MyTestCase < Test::Unit::TestCase def test_do_something assert_equal(2,do_something) end end C:\>ruby test.rb Loaded suite test Started F Finished in 0.031 seconds. 1) Failure: test_do_something(MyTestCase) [test.rb:12]: <2> expected but was <1>. 1 tests, 1 assertions, 1 failures, 0 errors More info at http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/