Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a testing "bootstrap" Ruby script that handles test setup (requires libraries, prepares test variables etc.) and I want the Rake TestTask to run this file before it runs the tests. Is this possible?

I know that Rake starts the test in a new Ruby instance, so doing setup in the Rakefile won't work. The docs say that I can pass options to the Ruby command using TestTask.ruby_opts, but I haven't been able to find a Ruby option that executes a script file before the main script. I did find:

-rlibrary       require the library before executing your script

But that doesn't let me reference my testing bootstrap script

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.