Topic: Speccing a mixin under controllers folder
I have some functionality that is used by many different controllers. I extracted it into a module and put it under my app/controllers folder, and I include it in controllers. I also want to spec it in separation. The problem is that if I create a spec under spec/controllers folder, I get the error telling me that I must specify the controller which I describe:
Controller specs need to know what controller is being specified. You can indicate this by passing the controller to describe(): describe MyController do or by declaring the controller's name describe "a MyController" do controller_name :my #invokes the MyController end
Have anybody run into this before. How can I solve this?