I was wondering if there is any way to use fixtures for this setup
without modifiying the fixtures.rb file.
I’m using ‘modules’ for all my controllers, models and also for my
fixtures. E.g. my directory structure looks like this for example for
my site menus:
app
- controllers
- site <= this I call ‘module’
- menus_controller.rb <= the classname is: Site::MenusController
- site <= this I call ‘module’
- models
- site
- menu.rb <= the classname is: Site::Menu and the tablename
site_menus (set via set_table_name)
test
- menu.rb <= the classname is: Site::Menu and the tablename
- site
- fixtures
- site
- menus
I could not figure out how to get this work with fixtures and testing.
Right now I had to modifiy fixtures.rb file so I can pass table_name,
class_name and fixtures_file_path in order to create my fixtures for
testing.
- menus
- site
Is there any better way to do this?
Thanks, Daniel