I also think the line:
Code:
class ParentControllerTest < Test::Unit::TestCase
may need to be:
Code:
class DummyControllerTest < Test::Unit::TestCase
I think what you are doing will work. However, you will need to create more than just a new controller class. If you create DummyController, you will also need to create an app/views/dummy folder containing the views for each of the methods. Alternatively, you need a way to force actions in the dummy version of the controller to render the parent's views (an ugly way would be to use render in each of the parent controller methods - I'm sure there is probably a neater way to do it). Your error message:
Code:
Missing template ../app/views/dummy/song_search.rhtml
suggests to me that this is where your problem lies.
You'll also need to manually create your fixtures and tests, but your post suggests you are already working on that.
If you are using this technique to share some common controller methods with a number of controllers, it would be worth considering using a module or mixin rather than inheritance.
Bookmarks