[rspec-users] render_to_string confusing ControllerSpec
dchelimsky at gmail.com
Mon Jun 16 21:34:38 EDT 2008
On Jun 16, 2008, at 2:58 PM, Andrew Selder wrote:
> Hi all,
> I have a controller I'm trying to spec out, and I'm running into
> some issues with render_to_string.
> Basically, the show gets an array of objects, calls render_to_string
> for each of them, and then renders the show template.
> So I have the standard spec:
> it "should render show template" do
> response.should render_template('show')
> but when I run the spec I get the following failure:
> 'SearchesController handling GET /searches/1 should render show
> template' FAILED
> expected "show", got "properties/_map_info_box"
> Does anybody have any ideas?
Please post the controller action and the full backtrace:
script/spec spec/controller/path/to/the/spec.rb -fsb
More information about the rspec-users