Autotest is supposed to map my tests to a class, I believe. When I have class Foo
and class FooTest
, autotest should see FooTest
and say, "Hey, this test corresponds to the unit Foo
, so I'll look for changes there and re-run tests when changes occur." And that works, however...
When I have Foo::Bar
and Foo::BarTest
, autotest doesn't seem to make the connection, and whenever I edit Foo::Bar
, autotest does not re-run Foo::BarTest
Am I doing something wrong?
EDIT: File structure might be helpful. Here it is:
Module and class files:
lib/foo.rb
lib/foo/bar.rb
lib/foo/baz.rb
Test files:
test/unit/foo/bar.rb
test/unit/baz.rb
I would think that autotest is able to make the connection between Foo::Bar
and Foo::BarTest
, but apparently it doesn't.
Apparently autotest -rails
doesn't play nicely with namespaced stuff in lib/*
. If I force just plain autotest without Rails mode, this setup works fine with a little tweaking.