On Tue, Feb 18, 2003 at 06:54:08AM +0900, Daniel Carrera wrote: > I'm trying to figure out how to ust Test::Unit. I've read the > documentation in: > http://testunit.talbott.ws/doc/index.html > > But I'm no closer to understanding it than I was before. At the end of > the page, the author says that (s)he'd like to get some feedback. Whoever > the author might be, here is some feedback: > > 1) Include your name and email so that it's easier to send you feedback. > 2) Could you include an example of how I'd use Test::Unit? > > Here is a simple case. Say I write a private method to add two numbers: > > class MyClass > private > def add(a,b) > return a+b > end > end > > And I want to - say - assert that the return value is larger than the > first input value. How can I use Test::Unit to make this assertion? > > How can I use Test::Unit to assert in-between steps inside my methods? http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/64561 -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com How many chunks could checkchunk check if checkchunk could check chunks? -- Alan Cox