UnitTesting-Action view testcase is failed

Hi,

I run the "Unit testing", Then The "Actionview::Testcase" is failed. i.e
i am getting the error as below,

1) Error:
test_tablename(ActionView::TestCase):
TypeError: wrong argument type Class (expected Module)
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/helpers.rb:76:in
`include'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/helpers.rb:76:in
`add_template_helper'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/helpers.rb:76:in
`module_eval'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/helpers.rb:76:in
`add_template_helper'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/helpers.rb:118:in
`helper'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/helpers.rb:115:in
`each'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/helpers.rb:115:in
`helper'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/test_case.rb:104:in
`include_helper_modules!'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/test_case.rb:59:in
`send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/test_case.rb:59:in
`setup_with_controller'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in
`send'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in
`evaluate_method'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in
`call'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in
`run'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in
`each'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in
`send'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in
`run'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in
`run_callbacks'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/testing/setup_and_teardown.rb:60:in
`run'
/usr/local/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
/usr/local/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
/usr/local/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
/usr/local/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in
`run_suite'

Can anybody have an idea plz?

Thanks & Regards,
Periyasamy.R

At a random guess I'd guess that one of your view helpers is a class
rather than a module.

Fred

sorry Fred!. I couldn't understand what do you say?. Could you give more
details?.

My module name is like "test_results". Is this incorrect?

Please reply.

-Regards,
Periyasamy.R

sorry Fred!. I couldn't understand what do you say?. Could you give more
details?.

My module name is like "test_results". Is this incorrect?

That's ok, but is it actually a module rather than a class?

Fred

Please reply.

Okay i will mention the Model and class name details as below,

My model name is "test_instance.rb" and class name is "TestInstance".

My Unit test file name is "test_instance_test.rb" and the class name is
"TestInstanceTest".

When i run the unit test i am getting the error as below in
"ActionView::TestCase"

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

Is this enough details?. Please reply if you have any idea.

Regards,
Periyasamy.R

Hi Fred,

Just i downgrade the rails version from 2.3.5 to 2.3.2. Now this issue
is fixed.?.

Any idea why when i use the higher version rails the problem is occured?

Regards,
Periyasamy.