mamooth
unread,Mar 13, 2009, 10:56:41 AM3/13/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to make_resourceful
Hi all,
I'm encountering some problems with using make_resourceful with rspec
and rubyamf. Here's the main two problems I have ;
1. First with rspec :
All the default rspec generated controller's specs are failing on
destroy action :
ActionController::RedirectBackError in 'CategoriesController
responding to DELETE destroy should destroy the requested category'
No HTTP_REFERER was set in the request to this action, so
redirect_to :back could not be called successfully. If this is a test,
make sure to specify request.env["HTTP_REFERER"].
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/responses.rb:48:in `set_default_redirect'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/responses.rb:116:in `included'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:39:in `instance_eval'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:39:in `scope'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:25:in `response_for'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/actions.rb:96:in `destroy'
./spec/controllers/categories_controller_spec.rb:158:
2. With rubyamf :
Before installing rubyamf, I had only 3 broken specs (those due to the
problem 1). But after the plug ins installation, I've had 36 broken
specs, all with the same kind of problem :
ArgumentError in 'CustomersController responding to PUT udpate with
invalid params should expose the customer as @customer'
wrong number of arguments (2 for 1)
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/responses.rb:100:in `included'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:39:in `instance_eval'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:39:in `scope'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/callbacks.rb:25:in `response_for'
$(user_path)/application/rails/vendor/plugins/make_resourceful/lib/
resourceful/default/actions.rb:68:in `update'
./spec/controllers/customers_controller_spec.rb:129:
I'm not a rails killer, but I've spent several hours in a debugging
session. I really can't figure out how those errors are occurring. Is
someone could enlighten me ?
Thanks,
Mam