# Problems generating a model with a namespace

**URL:** <https://www.ruby-forum.com/t/problems-generating-a-model-with-a-namespace/61002>\
**Category:** Rails\
**Created:** [May 19, 2006, 5:47am UTC](https://www.ruby-forum.com/t/problems-generating-a-model-with-a-namespace/61002 "2006-05-19T05:47:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thuss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8dc957/32.png) [@thuss](https://www.ruby-forum.com/u/thuss)\
**Post date:** [May 19, 2006, 5:47am UTC](https://www.ruby-forum.com/t/problems-generating-a-model-with-a-namespace/61002/1 "2006-05-19T05:47:54Z")

</div>

I’m runnig Rails 1.1.2 and I’m trying to use a namespace with my model  
class such as Namespace::Test so I run:

script/generate model namespace/test  
create app/models/namespace  
create test/unit/namespace  
create test/fixtures/namespace  
create app/models/namespace/test.rb  
create test/unit/namespace/test\_test.rb  
create test/fixtures/namespace/tests.yml  
create db/migrate  
create db/migrate/001\_create\_namespace\_tests.rb

However, the unit test has the line “fixtures :tests” which causes the  
test to fail because it looks for the fixture file in  
test/fixtures/tests.yml instead of test/fixtures/namespace.yml. How do I  
tell the unit test to look for fixtures in it’s own namespace? Should I  
file this as a bug or am I doing something wrong?

Thanks,  
Todd  
[http://gabrito.com](http://gabrito.com)

---

<div class="post-metadata">

**Author:** ![thuss](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8dc957/32.png) [@thuss](https://www.ruby-forum.com/u/thuss)\
**Post date:** [May 19, 2006, 5:49am UTC](https://www.ruby-forum.com/t/problems-generating-a-model-with-a-namespace/61002/2 "2006-05-19T05:49:58Z")

</div>

I meant to say “it looks for the fixture file in  
test/fixtures/tests.yml instead of test/fixtures/namespace/tests.yml”.  
Sorry for the mistake!
