# How to write units tests for controller

**URL:** <https://www.ruby-forum.com/t/how-to-write-units-tests-for-controller/179505>\
**Category:** Rails\
**Created:** [November 26, 2009, 12:45pm UTC](https://www.ruby-forum.com/t/how-to-write-units-tests-for-controller/179505 "2009-11-26T12:45:37Z")\
**Posts on this page:** 4\
**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:** [November 26, 2009, 12:45pm UTC](https://www.ruby-forum.com/t/how-to-write-units-tests-for-controller/179505/1 "2009-11-26T12:45:37Z")

</div>

Guys,

Anybody have an idea about how to write units tests for controller …?  
Anybody give me the link for tutorials/send me in the right direction…

Thanks

---

<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:** [November 26, 2009, 3:11pm UTC](https://www.ruby-forum.com/t/how-to-write-units-tests-for-controller/179505/2 "2009-11-26T15:11:07Z")

</div>

Hi Hemant B.

It is functional tests You can start from here

> **[Testing Rails Applications — Ruby on Rails Guides](https://guides.rubyonrails.org/testing.html)**
>
> Testing Rails ApplicationsThis guide covers built-in mechanisms in Rails for testing your application.After reading this guide, you will know: Rails testing terminology. How to write unit, functional, integration, and system tests for your...

Sijo

---

<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:** [November 26, 2009, 3:33pm UTC](https://www.ruby-forum.com/t/how-to-write-units-tests-for-controller/179505/3 "2009-11-26T15:33:44Z")

</div>

Thanks Sijo …  
Sijo k g wrote:

> Hi Hemant B.
> 
> It is functional tests You can start from here
> 
> [Testing Rails Applications — Ruby on Rails Guides](http://guides.rubyonrails.org/testing.html)
> 
> Sijo

---

<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:** [November 26, 2009, 3:35pm UTC](https://www.ruby-forum.com/t/how-to-write-units-tests-for-controller/179505/4 "2009-11-26T15:35:45Z")

</div>

Hemant B. wrote:

> Guys,
> 
> Anybody have an idea about how to write units tests for controller …?

Don’t. Use Cucumber.

> Anybody give me the link for tutorials/send me in the right direction…

[http://www.cukes.info](http://www.cukes.info)

> Thanks

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
