# Tests fail through rake

**URL:** <https://www.ruby-forum.com/t/tests-fail-through-rake/138844>\
**Category:** Rails\
**Created:** [May 28, 2008, 10:08am UTC](https://www.ruby-forum.com/t/tests-fail-through-rake/138844 "2008-05-28T10:08:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MohsinHijazee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e68b1a/32.png) [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Post date:** [May 28, 2008, 10:08am UTC](https://www.ruby-forum.com/t/tests-fail-through-rake/138844/1 "2008-05-28T10:08:08Z")

</div>

Hi!  
I have a strange problem. I have three controllers of same name  
EntitiesController. One is under rest/entities\_controller.rb and is  
called Rest::EntitiesController, the other is under admin/  
entities\_controller.rb in module Admin::EntitiesController and the  
last one is in app/controllers/entities\_controller.rb and is called  
EntitiesController  
When I execute tests separately, All is fine but when I do this:

rake test:functionals

Then the tests of app/controllers/entities\_controller.rb fail. On  
investigation, it revealed that the tests of this controller are  
posting there requests to actually rest/entities\_controller.rb.  
I thougth doing this  
require “#{RAILS\_ROOT}/app/controllers/entities\_controller.rb”

at the top of test/functional/entities\_controller.rb would fix the  
problem but no gain.

What might be the problem? Please guide me in this regard.
