Hi there,
I've been using Rspec for a while and for some reason am receiving errors on a controller called ReferencesController.
The error says that I have to specify the controller name by either using:
describe MyController do
or
describe 'aoeuaoeu' do
controller_name :my
I've tried both variations:
describe ReferencesController do
and
describe 'refs controller' do
controller_name :references
But I get an error for both! Any Idea what could be going on wrong?
Berns
EDIT: Due to the nature of the solution, I've reworded the title and added relevant code. Here's the erroneous code:
#references_controller.rb
class ReferencesController < ApplicationController
def initialize(*args)
#do stuff
super(args) # <= this is the problem line
end
def index
end
end
And the error:
1)
'ReferencesController GET index should take parameters for a company and return the references' FAILED
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