Skip to content

Commit

Permalink
2-0-stable: Make the non inferrable controller message a little frien…
Browse files Browse the repository at this point in the history
…dlier. [Koz]

Merging [8749]


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/2-0-stable@8838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
NZKoz committed Feb 10, 2008
1 parent e3a39ca commit 0dad92a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion actionpack/lib/action_controller/test_case.rb
Expand Up @@ -3,9 +3,15 @@
module ActionController
class NonInferrableControllerError < ActionControllerError
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"
"test case definition. This could mean that #{inferred_controller_name} does not exist " +
"or it contains syntax errors"
end

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

Expand Down

0 comments on commit 0dad92a

Please sign in to comment.