From: Austin Ziegler Date: 2007-02-20T02:56:01+09:00 Subject: Re: Assertions Testing in irb On 2/19/07, Bharat Ruparel wrote: > I am working through the Everyday Scripting With Ruby book and am trying > to run assertion tests in irb. > > If I type in: > irb(main):005:0> require 'test/unit' > => true > As you can see above it returns true. I am assuming that this will load > the unit test methods in irb. However, if I type in an assertion test > as follows: No. It loads the Test::Unit framework. This gives you Test::Unit::TestCase (the class where you use unit test assertions), but you can include the assertions anywhere: include Test::Unit::Assertions That will include them in Object and you can use them that way. I'm not sure I recommend this, though. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca