[rspec-users] spec for a rails helper that renders a partial template

David Chelimsky dchelimsky at gmail.com
Thu Jul 15 09:16:29 EDT 2010


On Jul 13, 2010, at 6:59 PM, Jonathan Rochkind wrote:

> David Chelimsky wrote:
>> On Jul 13, 2010, at 6:05 PM, Jonathan Rochkind wrote:
>> 
>> Do you know about integrate_views?
>> 
>> http://rspec.info/rails/writing/controllers.html
> 
> I read about it in my quest through the documentation for a solution.
> 
> This isn't actually a controller spec I'm trying to write, it's a helper 
> spec. If I actually set it up as a helper spec... I don't seem to get 
> "integrate_views", if I try to call it I get a method missing exception.
> 
> Can I set it up as a controller spec, but then somehow still spec a 
> helper method, rather than a controller?  I thought of that, and tried 
> to do it, but couldn't quite figure out how to do that. Any advice?

I don't think there's a good way to do that in RSpec-1. In RSpec-2, however, you should be able to do this in a regular helper spec.

HTH,
David

> Jonathan



More information about the rspec-users mailing list