Shoulda on Rails - should render_with_layout deferred

I would appreciate if someone could help/explain the following please.

I am trying to test a controller with shoulda to see if a correct layout is used.

The method should_render_with_layout throws a NoMethodError whilst should render_with_layout passes but says the function is deferred.

Any help would be appreciated.. Thanks Matt


and thanks to tsdbrown for your response. I am running shoulda 2.10.2. I have manage to resolve the problem. I had not initiated a get request, but after adding get request to setup the below test is now passing. Thanks for help.

 context "getting index" do
   setup do
     get :index

   should_respond_with :success
   should_render_with_layout :admin
   should_render_template :index
   should_assign_to :venue, :class => Venue

Need Your Help

How to add style to second-to-last only if total number of children are even?

css css3 css-selectors

So, I have a dynamic number of list items and I would like to apply a style to the second to last.... IF only there are an even number of elements.

What is the best way to draw dynamic circle in browser (apart from flash)

javascript html html5

I want to draw circle, and i want to re size it based on some server events? Is it possible js/html?