[BioRuby] GSOC: Unit testing in BioRuby
Diana Jaunzeikare
rozziite at gmail.com
Sat May 23 20:12:31 UTC 2009
Hi,
How does unit testing in BioRuby works?
I created new file /lib/bio/db/phyloxml.rb and
test/unit/bio/db/test_phyloxml.rb I also put some sample xml files in
/test/unit/data/phyloxml/ directory.
How can I access the data set in data directory from the test_phyloxml.rb
file?
Can I give path relative path to the data file? for example
"../../../data/phyloxml/phyloxml_examples.xml"
I saw other test files have this code:
"require 'pathname'
libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 3,
'lib')).cleanpath.to_s
$:.unshift(libpath) unless $:.include?(libpath)
"
Is this code for that purpose? I am not really sure what this piece of code
means.
Thanks,
Diana
More information about the BioRuby
mailing list