# Problem with running functional tests( ActionView::Template)

**URL:** <https://www.ruby-forum.com/t/problem-with-running-functional-tests-actionview-template/153290>\
**Category:** Rails I18n\
**Created:** [November 14, 2008, 12:08pm UTC](https://www.ruby-forum.com/t/problem-with-running-functional-tests-actionview-template/153290 "2008-11-14T12:08:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirankinuforu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/977dab/32.png) [@kirankinuforu](https://www.ruby-forum.com/u/kirankinuforu)\
**Post date:** [November 14, 2008, 12:08pm UTC](https://www.ruby-forum.com/t/problem-with-running-functional-tests-actionview-template/153290/1 "2008-11-14T12:08:56Z")

</div>

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:in`send’  
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:in`render\_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:in`render\_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:in`render\_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:in`measure’  
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:in`render\_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:in`perform\_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:in`perform\_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:in`measure’  
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:in`perform\_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:in`process\_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:in`process\_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:in`process’  
E:/MyAptanaProject/Community\_sprint\_035  
Recent/app/controllers/application.rb:85:in `catch' E:/MyAptanaProject/Community_sprint_035 Recent/app/controllers/application.rb:85:in`process’  
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:in`get’  
members\_controller\_test.rb:29:in  
`test_profile_member_card_visitor_viewing_public' E:/ruby/lib/ruby/1.8/test/unit/testcase.rb:78:in` **send** ’  
E:/ruby/lib/ruby/1.8/test/unit/testcase.rb:78:in `run' E:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:34:in`run’  
E:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each' E:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in`run’  
E:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run' E:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in`each’  
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:in`run\_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:in`start’  
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:in`run’  
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.

---

<div class="post-metadata">

**Author:** ![kirankinuforu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/977dab/32.png) [@kirankinuforu](https://www.ruby-forum.com/u/kirankinuforu)\
**Post date:** [March 23, 2009, 8:48pm UTC](https://www.ruby-forum.com/t/problem-with-running-functional-tests-actionview-template/153290/2 "2009-03-23T20:48:34Z")

</div>

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.
