Exception: ActionController::NonInferrableControllerError

Inherits:
ActionControllerError show all
Defined in:
lib/action_controller/test_case.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ NonInferrableControllerError

Returns a new instance of NonInferrableControllerError.



5
6
7
8
9
10
11
# File 'lib/action_controller/test_case.rb', line 5

def initialize(name)
  @name = name
  super "Unable to determine the controller to test from #{name}. " +
    "You'll need to specify it using 'tests YourController' in your " +
    "test case definition. This could mean that #{inferred_controller_name} does not exist " +
    "or it contains syntax errors"
end

Instance Method Details

#inferred_controller_nameObject



13
14
15
# File 'lib/action_controller/test_case.rb', line 13

def inferred_controller_name
  @name.sub(/Test$/, '')
end