[LRUG] Rspec sees different output from Rails application

John Winters john at sinodun.org.uk
Sat Jul 16 06:07:12 PDT 2011


On Sat, 16 Jul 2011 13:55:13 +0100, Simon Coffey <simon at tribesports.com>
wrote:
> Hi John,
> 
> By default, rspec will not render your views in a controller spec, so
> that controller logic can be tested in isolation from template code. I
> suspect the output you're seeing is stub content created by rspec
> rather than your app. If you want your controller test to render the
> views using your own templates, add the following line:
> 
> describe SomeController do
>   render_views
>   ...
> end

Thank you - you win the coconut or cuddly toy according to preference.

That line is actually there in the instructions which I'm using but I'd
failed to include it in my own file.

Cheers,
John



More information about the Chat mailing list