public
Description: Koz's rails git-svn clone
Homepage: http://www.rubyonrails.org
Clone URL: git://github.com/NZKoz/koz-rails.git
2-0-stable: Make the non inferrable controller message a little 
friendlier.  [Koz]

Merging [8749]


git-svn-id: 
http://svn-commit.rubyonrails.org/rails/branches/2-0-stable@8838 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
nzkoz (author)
Sat Feb 09 17:10:14 -0800 2008
commit  f35136fc09e649439ff6b9992409ed812c4c8509
tree    3ee50c57d493dba608cb06596bdec8faaecb0760
parent  00f157aca2e51ce1684d15e2fff770422c9f3868
...
3
4
5
 
6
7
8
 
 
 
 
 
 
9
10
11
...
3
4
5
6
7
8
 
9
10
11
12
13
14
15
16
17
0
@@ -3,9 +3,15 @@ require 'active_support/test_case'
0
 module ActionController
0
   class NonInferrableControllerError < ActionControllerError
0
     def initialize(name)
0
+ @name = name
0
       super "Unable to determine the controller to test from #{name}. " +
0
         "You'll need to specify it using 'tests YourController' in your " +
0
- "test case definition"
0
+ "test case definition. This could mean that #{inferred_controller_name} does not exist " +
0
+ "or it contains syntax errors"
0
+ end
0
+
0
+ def inferred_controller_name
0
+ @name.sub(/Test$/, '')
0
     end
0
   end
0
 

Comments

    No one has commented yet.