[rspec-users] Error in executing controller spec

Amit Kulkarni lists at ruby-forum.com
Fri May 8 07:03:46 EDT 2009


Hello,

     I am trying to execute controller spec but it gives me error which
says

     @controller is nil: make sure you set it in your test's setup
method.

I tried to search for the solution but till now no success :(

Following is the description of the controller spec.

describe ChannelCategoriesController do

  context "Admin" do

    before(:each) do
      @cha_category = ChannelCategory.new
    end

      it "should delete categories" do
        delete :destroy, :id => 1
      end
 end
end

Please advice :-)
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list