Problem with running functional tests( ActionView::Template)

Hi,
I am trying to run functional tests in my application but I am
getting following error when I am trying to the tests:

  1. Error:
    test_profile_member_card_visitor_viewing_public(MembersControllerTest):
    ActionView::TemplateError: undefined method `use_wrapper’ for
    #<#Class:0x45cd1dc:0x8c201c0>
    On line #1 of app/views/members/profile.rhtml
1: <% use_wrapper :standard -%>
2: <% show :prototype %>
3: <% show :scriptaculous %>
4: <% show :lytebox %>

E:/MyAptanaProject/Community_sprint_035

Recent/app/views/members/profile.rhtml:1:in
_run_rhtml_47app47views47members47profile46rhtml' E:/MyAptanaProject/Community_sprint_035 Recent/vendor/rails/actionpack/lib/action_view/base.rb:325:insend’
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_view/base.rb:325:in
compile_and_render_template' E:/MyAptanaProject/Community_sprint_035 Recent/vendor/rails/actionpack/lib/action_view/base.rb:301:inrender_template’
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_view/base.rb:260:in
render_file' E:/MyAptanaProject/Community_sprint_035 Recent/vendor/rails/actionpack/lib/action_controller/base.rb:812:inrender_file’
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_controller/base.rb:717:in
render_with_no_layout' E:/MyAptanaProject/Community_sprint_035 Recent/vendor/rails/actionpack/lib/action_controller/layout.rb:247:inrender_without_benchmar
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:50:in
render_without_act E:/ruby/lib/ruby/1.8/benchmark.rb:293:inmeasure’
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:50:in
render_without_act E:/MyAptanaProject/Community_sprint_035 Recent/vendor/plugins/active_scaffold/lib/extensions/action_controller.rb:13:inrender_withou
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/plugins/eons_plugins/query_stats/lib/query_stats/labeler.rb:19:in
render' E:/MyAptanaProject/Community_sprint_035 Recent/vendor/rails/actionpack/lib/action_controller/base.rb:1102:inperform_action_without_f
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_controller/filters.rb:696:in
call_filters' E:/MyAptanaProject/Community_sprint_035 Recent/vendor/rails/actionpack/lib/action_controller/filters.rb:688:inperform_action_without
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in
perform_action_wit E:/ruby/lib/ruby/1.8/benchmark.rb:293:inmeasure’
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in
perform_action_wit E:/MyAptanaProject/Community_sprint_035 Recent/vendor/rails/actionpack/lib/action_controller/rescue.rb:83:inperform_action’
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_controller/base.rb:435:in
send' E:/MyAptanaProject/Community_sprint_035 Recent/vendor/rails/actionpack/lib/action_controller/base.rb:435:inprocess_without_filters’
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_controller/filters.rb:684:in
process_without_sessio E:/MyAptanaProject/Community_sprint_035 Recent/vendor/rails/actionpack/lib/action_controller/session_management.rb:114:inprocess_wit
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_controller/test_process.rb:15:in
process' E:/MyAptanaProject/Community_sprint_035 Recent/app/controllers/application.rb:86:inprocess’
E:/MyAptanaProject/Community_sprint_035
Recent/app/controllers/application.rb:85:in catch' E:/MyAptanaProject/Community_sprint_035 Recent/app/controllers/application.rb:85:inprocess’
E:/MyAptanaProject/Community_sprint_035
Recent/vendor/rails/actionpack/lib/action_controller/test_process.rb:385:in
process' E:/MyAptanaProject/Community_sprint_035 Recent/vendor/rails/actionpack/lib/action_controller/test_process.rb:356:inget’
members_controller_test.rb:29:in
test_profile_member_card_visitor_viewing_public' E:/ruby/lib/ruby/1.8/test/unit/testcase.rb:78:insend
E:/ruby/lib/ruby/1.8/test/unit/testcase.rb:78:in run' E:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:34:inrun’
E:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in each' E:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:33:inrun’
E:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:34:in run' E:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:33:ineach’
E:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in run' E:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:inrun_suite’
E:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:67:in
start_mediator' E:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:instart’
E:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in run' E:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:216:inrun’
E:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run’
E:/ruby/lib/ruby/1.8/test/unit.rb:278
members_controller_test.rb:320

           I have a member controller with me, and for member

controller profile action I have a profile page which includes some view
helpers through the application helper.(There are some files included
from application helper.)
In above output the I have defined use_wrapper method in
one of the files included in the application helper.
I have tried to resolve the error by including all helpers
in test helper, but no luck. Please help.

Kiran,

I am experiencing this same problem. The methods I have defined in
ApplicationHelper (app/helpers/application_help.rb) are not available in
tests, although they do work in dev mode when I use the app via web
browser. Did you find a solution for this?

Thanks

Kiran DP wrote:

Hi,
I am trying to run functional tests in my application but I am
getting following error when I am trying to the tests:

  1. Error:
    test_profile_member_card_visitor_viewing_public(MembersControllerTest):
    ActionView::TemplateError: undefined method `use_wrapper’ for
    #<#Class:0x45cd1dc:0x8c201c0>
    On line #1 of app/views/members/profile.rhtml
1: <% use_wrapper :standard -%>
2: <% show :prototype %>
3: <% show :scriptaculous %>
4: <% show :lytebox %>

E:/MyAptanaProject/Community_sprint_035

Recent/app/views/members/profile.rhtml:1:in
`_run_rhtml_47app47views47members47profile46rhtml’

[backtrace was here…]

members_controller_test.rb:320

           I have a member controller with me, and for member

controller profile action I have a profile page which includes some view
helpers through the application helper.(There are some files included
from application helper.)
In above output the I have defined use_wrapper method in
one of the files included in the application helper.
I have tried to resolve the error by including all helpers
in test helper, but no luck. Please help.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs