> Hey-
>
> I''m getting the following error when I test my controller:
>
> NoMethodError: undefined method `process'' for
#<CartController:0x1017960>
>
/usr/lib/ruby/gems/1.8/gems/actionpack-1.4.0/lib/action_controller/test_process.rb:246:in
> `process''
> (eval):3:in `get''
> ./test/functional/cart_controller_test.rb:16:in `test_index''
>
> This is my CartController index method:
>
> def index
> @cart = session["cart"]
> end
>
> And this is my test_index method:
> def test_index
> get :index
> assert_session_has_no "cart"
> assert_template_has "cart"
>
> c = Cart.new
> c.add(@soap_1)
> @request.session["cart"] = c
>
> get :index
> assert_session_has "cart"
> assert_template_has "cart"
> assert_equal c, @response.session["cart"]
> end
>
> What am I doing wrong?
>
> Thanks,
> J.D.
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
Hi JD -- when i have had trouble with this error in the past, it is
usually because there is an error somewhere in CartController, and
rather than throwing an error, rails just doesn''t load the class.
Try using the console script, then ''require'' the file
cart_controller.rb
-- that will give you some indication of where your problem might lie.
Lee