Forum: Ruby on Rails Problems generating a model with a namespace

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Todd H. (Guest)
on 2006-05-19 07:47
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
Todd H. (Guest)
on 2006-05-19 07:49
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!
This topic is locked and can not be replied to.