From: Jim Freeze Date: 2006-10-31T05:41:50+09:00 Subject: Re: __FILE__ for requiring file ------=_Part_84305_1759526.1162240903073 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks guys. This is what I ended up with: module TestHelper __REQUIRING_FILE__ = /([^:]*):/.match(caller[1])[1] TEST_DIR = File.dirname(__REQUIRING_FILE__) DATA_DIR = File.join(TEST_DIR, "data") def data_file(file) File.join(DATA_DIR, file) end end#module TestHelper -- Jim Freeze ------=_Part_84305_1759526.1162240903073--