Forum: Ruby on Rails Problems with Functional Tests after upgrading.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Rich W. (Guest)
on 2006-04-03 17:09
(Received via mailing list)
I just upgraded to rails 1.1. Now I'm having two problems (both seem
to be related to scaffold).

The controller in question uses scaffold, but overwrites most of the
actions (all except :show and :destroy).

When I test the application by hand, everything seems to be working
fine, except the links that call :destroy. These simply redisplay the
list, without removing any items. Functional tests also fail to
remove the item.

More oddly, when I run the functional tests,  any call to
"get :create" seems to call scaffold's :create action, not my
controller's :create action. I've checked the other overwritten
actions (:list, :new and :edit), and the test correctly calls my
controller's version of these. Just :create seems to be acting
strange. (if I comment out the call to scaffold at the top of the
controller, then the :create tests work right. Of course, this
causes :show and :destroy to stop working).

Any idea what's going on here?

I know I could just drop scaffolding and write my own :show
and :destroy actions (and a show view). I may have to do that
for :destroy anyway (since scaffold's version no longer seems to
work). But I'd really like to know why this is happening (and is it a
symptom of something worse going on--for example, missing an
important step while upgrading).

-Rich-
This topic is locked and can not be replied to.