[rspec-users] Testing misc methods in ApplicationController

Fernando Perez lists at ruby-forum.com
Fri Feb 13 19:26:04 EST 2009


How do you spec protected controller methods such as before_filters and
helpers that with the params and session hashes?

I cannot call controller.my_method if my_method is protected.

> Try this:
> 
> controller.andreplace("foo and bar").should eql("+foo +bar")

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list