hi,
thanks for your latest patch, it is better than before.
anyway, i was thinking isn't that better if it could have the original
error message.
let's say -
    def determine_default_controller_class(name)
        name.sub(/Test$/, '').constantize
      rescue NameError
        raise NonInferrableControllerError.new(name, $!) # pretending
their is an update with the constructor with an optional message
field.
      end

class NonInferrableControllerError
  def initialize(p_name, p_message)
    # ....
  end
end

best wishes,
On Jan 30, 7:34 am, "Michael Koziarski" <[EMAIL PROTECTED]> wrote:
> > i was wondering why i was getting the following message -
> > "Unable to determine the controller to test from
> > ServiceControllerTest. You'll need to specify it using 'tests
> > YourController' in your test case definition"
>
> I've changed the error message a little in:
>
> http://dev.rubyonrails.org/changeset/8749
>
> Hopefully this makes it a little easier to track down.
>
>
>
>
>
> > after trying several times, i found my "ServiceController" had
> > initialization error as i had included wrong method name. though to
> > coming up with this conclusion i had to add "puts $!" to
> > ActionController::TestCase.
>
> >      def determine_default_controller_class(name)
> >         name.sub(/Test$/, '').constantize
> >       rescue NameError
> >         puts "Error #{$!}"
> >         raise NonInferrableControllerError.new(name)
> >       end
>
> > i think there should have a patch where it clearly mention about the
> > original error message.
>
> > best wishes,
> > --
> > ----------------------------------------------------
> > nhm tanveer hossain khan (hasan)
> >http://hasan.we4tech.com
> > ----------------------------------------------------
> > mobile: +880 1713 090 511
> > ----------------------------------------------------
> >               "work for fun"
>
> --
> Cheers
>
> Koz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to