From: Austin Ziegler Date: 2007-02-20T03:39:34+09:00 Subject: Re: Assertions Testing in irb On 2/19/07, Bharat Ruparel wrote: > > 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 > > I did that and it works! Thanks. Why are you saying that you have > doubts about recommending something that gets the job done? I don't recommend using Test::Unit assertions in IRB. > I have a side question. I am not sure when to use: > > 1. load This will load a Ruby source (.rb or dynamic library) regardless of whether it's been included before. It does not have automatic resolution (e.g., require 'foo/bar' would need to be load 'lib/foo/bar.rb'), if lib/foo/bar.rb is the appropriate relative path from the current working directory. > 2. require This will load a Ruby source once and only once. This is most common. > 3. include This is the mechanism used for mixing in modules. This is wholly unrelated to require and load. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca