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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and 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?

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.