I’m trying to invoke rake from within one of my Unit Test files to setup
a
test database before running tests and I’m having some trouble doing so.
I
try the following code in a file that is located in the same directory
as my
Rakefile:
Did you require the rakefile in you code? rake does so automatically.
Thanks,
Gordon
Wow, that was very terse. Even for me. What I mean is that the rake
command will require your rakefile automatically. But if you want to
use a rake task from ruby, you will have to explicitly require the
rakefile.