[rspec-users] expect_render

Scott Taylor mailing_lists at railsnewbie.com
Mon Sep 29 15:52:06 EDT 2008


I'm trying to write a spec asserting that no layout should be used in  
a controller.  My spec currently looks like this:

     it "should render with no layout" do
       controller.expect_render.with(hash_including(:layout => nil))
       do_action
     end


And this code, which should pass the spec, isn't:

class AController < ApplicationController
   layout nil
end

What am I doing wrong?

Best,

Scott Taylor



More information about the rspec-users mailing list