# Missing templates problem in tests

**URL:** <https://www.ruby-forum.com/t/missing-templates-problem-in-tests/188319>\
**Category:** Rails\
**Created:** [May 10, 2010, 9:51am UTC](https://www.ruby-forum.com/t/missing-templates-problem-in-tests/188319 "2010-05-10T09:51:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [May 10, 2010, 9:51am UTC](https://www.ruby-forum.com/t/missing-templates-problem-in-tests/188319/1 "2010-05-10T09:51:27Z")

</div>

Hello champs,

I have been writing a functional test in which i create a new record  
and finds out that the record is porperly created or not. So i do it  
like this:-

def test\_should\_create\_record  
assert\_difference(‘ABC.count’) do  
post :method\_name, :abc =\> {  
:name =\> “Abc”,  
:email =\> “removed\_email\_address@domain.invalid”,  
:phone =\> “+91234567899”  
}  
assert\_equal “Please select abc first”, flash[:notice]  
end  
end

## IN development, if i create any record with these parameter, it gets created. But IN test phase, it is giving me error that ::

## ActionView::MissingTemplate: Missing template abc/method\_name.erb in view path app/views

How to tackle with it… ? By request.env[‘HTTP\_REFERER’] or what … ?
