Forum: Ruby on Rails Strange error in unit test => TypeError: wrong argument type Class (expected Module)

13d3f8b3bd8cbff023835c2395c9f07b?d=identicon&s=25 vfr292 (Guest)
on 2010-04-15 08:15
(Received via mailing list)
I'm running a unit test in rails 2.3.5

Below is the error:

  1) Error:
test1s(ActionView::TestCase):
TypeError: wrong argument type Class (expected Module)

Has anyone seen this before?  Is there a solution/work around?

I have tried changing my testing code, but it always shows up as the
fourth test which makes me think that it is a general error rather
then something to do with my test.

Thank you for you help,

~Victor
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2010-04-15 09:27
(Received via mailing list)
On 15 April 2010 03:33, vfr292 <vfr292@gmail.com> wrote:
> I have tried changing my testing code, but it always shows up as the
> fourth test which makes me think that it is a general error rather
> then something to do with my test.

Can you reduce your test rb file to the minimum that shows the error
and paste it here?  Actually I would not be surprised if you found the
problem while reducing it.

Colin
13d3f8b3bd8cbff023835c2395c9f07b?d=identicon&s=25 vfr292 (Guest)
on 2010-05-21 01:17
(Received via mailing list)
Hi,

Well, I have have continued to work on this, but with no luck.

The error pops up for every test I run for every model and controller
(not just the test1 model).

Any ideas?

~Victor
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2010-05-21 09:18
(Received via mailing list)
On May 21, 12:15 am, vfr292 <vfr...@gmail.com> wrote:
> Hi,
>
> Well, I have have continued to work on this, but with no luck.
>
> The error pops up for every test I run for every model and controller
> (not just the test1 model).
>

What does your test case look like ? It looks like you're writing a
test for a view helper, is that view helper a class rather than a
module ?

Fred
C0d08ce21b62bcb009e5f274c22b03fe?d=identicon&s=25 Gabriel Odess-gillett (gabeodess)
on 2011-06-02 05:47
I had this same error I solved the problem by removing the related
fixtures.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.