Forum: Ruby Odd unit test error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Kenneth McDonald (Guest)
on 2008-10-21 22:58
(Received via mailing list)
On one of my unit test errors, I'm getting the error message:

NameError: uncaught throw 'invalid_test'

It's the part about "uncaught throw 'invalid_test'" that I don't get.
That sounds like an error from the unit test framework itself. Can
anyone shed any light on what this means?

Thanks,
Ken
Brian C. (Guest)
on 2008-10-22 01:21
Kenneth McDonald wrote:
> On one of my unit test errors, I'm getting the error message:
>
> NameError: uncaught throw 'invalid_test'
>
> It's the part about "uncaught throw 'invalid_test'" that I don't get.
> That sounds like an error from the unit test framework itself. Can
> anyone shed any light on what this means?

Can you post the whole backtrace? And what code causes this error?

The only instance of it I can see in the source is test/unit/testcase.rb
line 43, which looks like either you're trying to invoke a test which
doesn't exist, or you're invoking a test with invalid arity like

  def test_foo(x)
    ...
  end

But normally the framework would never try to invoke such a method
anyway, so it's strange.

You could try running with ruby -w, might give you some more clues.
This topic is locked and can not be replied to.