# Function Testing

**URL:** <https://www.ruby-forum.com/t/function-testing/105272>\
**Category:** Rails\
**Created:** [May 28, 2007, 10:34am UTC](https://www.ruby-forum.com/t/function-testing/105272 "2007-05-28T10:34:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gousi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e79b87/32.png) [@gousi](https://www.ruby-forum.com/u/gousi)\
**Post date:** [May 28, 2007, 10:34am UTC](https://www.ruby-forum.com/t/function-testing/105272/1 "2007-05-28T10:34:45Z")

</div>

hi,

First how to start the function testing in rails…

---

<div class="post-metadata">

**Author:** ![gousi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e79b87/32.png) [@gousi](https://www.ruby-forum.com/u/gousi)\
**Post date:** [May 28, 2007, 11:40am UTC](https://www.ruby-forum.com/t/function-testing/105272/2 "2007-05-28T11:40:53Z")

</div>

… might be:

[ruby on rails function testing - Google Search](http://www.google.ch/search?q=ruby+on+rails+function+testing)

and then the first link, or as presented here:

[Peak Obsession](http://manuals.rubyonrails.com/read/book/5)

marcel

---

<div class="post-metadata">

**Author:** ![gousi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e79b87/32.png) [@gousi](https://www.ruby-forum.com/u/gousi)\
**Post date:** [May 28, 2007, 5:05pm UTC](https://www.ruby-forum.com/t/function-testing/105272/3 "2007-05-28T17:05:36Z")

</div>

I suggest picking up a book that covers testing under rails. There  
are many good books. It is covered lightly in “Agile Web D.  
with Rails”, but I am sure there is a testing oriented book for rails  
by now.

The generators create a test for you under test/functional for each  
generated controller. Each method on those classes is executed as a  
test. The test can use things like “get :acton” and  
“put :action, :value1…” to simulate browser actions. There are  
assertions for testing the results, and the contents of the response  
html.

Michael
