On a website I created the is two commentable model, “project” and
“actuality”. You can view pages here :
in french for the momeent).
At the end of each page there is a form to create a new comment and a
for all comments. They have the same behaviour and they use the same
partials. My problem is for specs. I created two specs. Here :
There is a duplication and I want, if it’s possible, to have only one
I tried to create an engine but I’m not satisfied. The behaviour is
related to my application. For example, I have this inherited routes
resources :actualities do
resources :projects do
If I try to put only “resources :comments” it break my controller’s
To find the related model I must to add the class name into the params.
didn’t find another solution and I think it’s uggly.
Do you have and Idea? Is it better to have two specs for a similar
or is it better to remove an spec and keep the other?
Thanks for your help!