# Testing rake

**URL:** <https://www.ruby-forum.com/t/testing-rake/87012>\
**Category:** Ruby\
**Created:** [February 27, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/testing-rake/87012 "2007-02-27T16:30:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanholl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a87d85/32.png) [@hanholl](https://www.ruby-forum.com/u/hanholl)\
**Post date:** [February 27, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/testing-rake/87012/1 "2007-02-27T16:30:13Z")

</div>

Hi,

I installed rake-0.7.2 as a gem, and following the suggestion of the  
docs tried to run the tests.  
It complained about rcov, so I installed that as well, then the same  
for flexmock, and then it ran:  
UNABLE TO RUN FUNCTIONAL TESTS  
No Session Found  
Loaded suite  
/usr/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake/rake\_test\_loader  
Started  
…E…E…E…  
Finished in 9.683188 seconds.

1. Error:  
test\_load\_rakefile\_from\_subdir(TestApplication):  
Errno::ENOENT: No such file or directory - test/data/unittest/subdir  
./test/test\_application.rb:66:in `chdir' ./test/test_application.rb:66:in`test\_load\_rakefile\_from\_subdir’

2. Error:  
test\_require(TestApplicationOptions):  
LoadError: no such file to load – test/reqfile3  
/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
./lib/rake.rb:1778:in `do_option' ./lib/rake.rb:1814:in`handle\_options’  
/usr/lib/ruby/1.8/getoptlong.rb:460:in `each' /usr/lib/ruby/1.8/getoptlong.rb:457:in`each’  
./lib/rake.rb:1814:in `handle_options' ./test/test_application.rb:401:in`command\_line’  
./test/test\_application.rb:389:in `flags' ./test/test_application.rb:389:in`flags’  
./test/capture\_stdout.rb:11:in `capture_stdout' ./test/test_application.rb:388:in`flags’  
./test/test\_application.rb:387:in `flags' ./test/test_application.rb:305:in`test\_require’

3. Error:  
test\_can\_load\_rake\_library(TestRequire):  
LoadError: Can’t find test2  
./lib/rake.rb:1840:in `rake_require' ./test/test_require.rb:11:in`test\_can\_load\_rake\_library’

245 tests, 719 assertions, 0 failures, 3 errors  
rake aborted!  
Command failed with status (1): [/usr/bin/ruby -w -Ilib  
"/usr/lib/ruby/gems…]

Is there still something missing from my setup, or are these tests not  
quite up to date?

Cheers,

Han H.

---

<div class="post-metadata">

**Author:** ![hanholl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a87d85/32.png) [@hanholl](https://www.ruby-forum.com/u/hanholl)\
**Post date:** [March 1, 2007, 1:57pm UTC](https://www.ruby-forum.com/t/testing-rake/87012/2 "2007-03-01T13:57:50Z")

</div>

Han H. wrote:

> Hi,
> 
> I installed rake-0.7.2 as a gem, and following the suggestion of the  
> docs tried to run the tests.  
> It complained about rcov, so I installed that as well,

Hmm … rcov shouldn’t be required just to run unit tests. I’ll fix  
that.

> then the same  
> for flexmock, and then it ran:  
> UNABLE TO RUN FUNCTIONAL TESTS  
> No Session Found

The functional tests require the session gem to run. If you don’t have  
the session gem (or are on Windows where the session gem won’t work),  
you will automatically skip the functional tests. That has nothing to  
do with the following errors.

> Loaded suite  
> /usr/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake/rake\_test\_loader  
> Started  
> …E…E…E…  
> Finished in 9.683188 seconds.

It seems rake isn’t providing everything you need for the tests in the  
gem. I’ll look into this.

Thanks for the report.

– Jim W.
