-----BEGIN PGP SIGNED MESSAGE-----
I’ve got a quite deep class and directory hierarchy. It worked perfectly
well with Ruby 1.9.1, but after the upgrade to 1.9.2 it ceased working.
However, it is not the app itself that gets killed, but “rake test”.
This is my directory structure:
Along with a mirrored structure under test/ instead of src, which
the corresponding unit tests.
Now if I changed to src/ and run “ruby -I. ./gnyubuild”, it works out
However, running “rake test” fails:
/usr/bin/ruby -I"lib:src" “/usr/lib/ruby/1.9.1/rake/rake_test_loader.rb”
`module:GNyU’: uninitialized constant GNyU::GNyUBuild::Mode
The definitions of the constants are made in the corresponding files,
enclosed in a “module GNyU; … ; end” definition. So, e.g.,
has the following preamble:
Plus, I use “require” to load the super-class, e.g.
GNyU::GNyUBuild::Mode::Repository has a “require ‘gnyu/gnyubuild/mode’”
The ./src/gnyu/gnyubuild.rb file does not only house the definition of
GNyU::GNyUBuild class, but also serves as a mediator. That is, it loads
initializes the different “mode classes”, and as such has statements
the lines of “require ‘gnyu/gnyubuild/mode/repository’” in it. Removing
immediately causes the tests to run smoothly again.
The question now is: Why are the tests failing, while a “normal” run of
software works? Is there some sort of “circular name resolution” thingy
Thanks in advance for all answers. Let me know if you need some
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
-----END PGP SIGNATURE-----