On Jul 11, 12:45 pm, "Aaron Patterson" <[EMAIL PROTECTED]>
wrote:
> On Fri, Jul 11, 2008 at 9:33 AM, Sean Chittenden <[EMAIL PROTECTED]> wrote:
> >>> Not sure, I run ruby test/test_suite.rb.
>
> >> Looks like the test suite must be run from within the test directory.
> >> Otherwise test assets will not be found.  I've added a patch to the
> >> tracker that figures out where the assets directory is so that you can
> >> run the tests from a different directory (e.g. the root of the
> >> project).
>
> >>http://rubyforge.org/tracker/index.php?func=detail&aid=21162&group_id...
>
> > Ha!  I just committed something nearly identical to this because I couldn't
> > run the tests using ./setup.rb test.  I didn't use the constant, however and
> > did the File.join(...) for each open call.  Anyway, let me know if trunk
> > works for the tests for you now.  -sc
>
> The tests still do not work from setup.rb.  When I try to run the test
> suite from the root directory, I get an error loading libxml_ruby.
>
> I typically run the tests like this:
>
> [EMAIL PROTECTED] libxml]$ ruby -I lib:ext:test test/test_suite.rb
>
> This patch seems to fix things (I will submit it to the tracker if you'd 
> like):
>
> [EMAIL PROTECTED] libxml]$ svn diff
> Index: lib/libxml.rb
> ===================================================================
> --- lib/libxml.rb       (revision 382)
> +++ lib/libxml.rb       (working copy)
> @@ -1,7 +1,7 @@
>  # $Id$
>  # Please see the LICENSE file for copyright and distribution information
>
> -require 'libxml_ruby'
> +require 'libxml/libxml_ruby'

That works if ext/ is added to the load path. But if you look at meta/
project.yaml you will see that the loadpath is [lib, ext/libxml]. The
lack of "ext/libxml" in the $LOAD_PATH is probably why you had some
troubles. (If you are wondering, meta/project.yaml is what reap used
to do it's thing.)

We can change the loadpath to just "ext" --that seems like a nice
simplification actually. But we will need to make sure 'libxml_ruby'
=> libxml/libxml_ruby' where ever it occurs. Does anyone see a reason
not to do so?

T.
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to