Test (with RSpec) a controller outside of a Rails environment
Posted
by ramon.tayag
on Stack Overflow
See other posts from Stack Overflow
or by ramon.tayag
Published on 2010-04-05T07:36:38Z
Indexed on
2010/04/05
7:43 UTC
Read the original article
Hit count: 518
I'm creating a gem that will generate a controller for the Rails app that will use it. It's been a trial and error process for me when trying to test a controller. When testing models, it's been pretty easy, but when testing controllers, ActionController::TestUnit is not included (as described here). I've tried requiring it, and all similar sounding stuff in Rails but it hasn't worked.
What would I need to require in the spec_helper to get the test to work?
Thanks!
© Stack Overflow or respective owner