# Upgrading project to Rails 2. New generated functional tests fail

**URL:** <https://www.ruby-forum.com/t/upgrading-project-to-rails-2-new-generated-functional-tests-fail/127666>\
**Category:** Rails\
**Created:** [January 31, 2008, 8:17am UTC](https://www.ruby-forum.com/t/upgrading-project-to-rails-2-new-generated-functional-tests-fail/127666 "2008-01-31T08:17:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![apremdas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac91a4/32.png) [@apremdas](https://www.ruby-forum.com/u/apremdas)\
**Post date:** [January 31, 2008, 8:17am UTC](https://www.ruby-forum.com/t/upgrading-project-to-rails-2-new-generated-functional-tests-fail/127666/1 "2008-01-31T08:17:40Z")

</div>

When running the command

‘./script/generate scaffold SkillCategory name:text’

in a new Rails project, I get nicely generated code that passes all  
its tests

When running the same code in my updated project the same code is  
generated but four of the functional tests fail. The project has been  
upgraded by using ‘rake rails:update’

The error messages are

test\_should\_destroy\_skill\_category(SkillCategoriesControllerTest):  
NoMethodError: undefined method `skill_categories' for #<SkillCategoriesControllerTest:0x19c7628> /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ test_process.rb:464:in`method\_missing’  
./test/functional/skill\_categories\_controller\_test.rb:40:in  
`test_should_destroy_skill_category' /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/ core_ext/test/unit/assertions.rb:39:in`assert\_difference’

Any ideas why this might be happening

Many thanks

Andrew

---

<div class="post-metadata">

**Author:** ![apremdas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac91a4/32.png) [@apremdas](https://www.ruby-forum.com/u/apremdas)\
**Post date:** [February 4, 2008, 5:12am UTC](https://www.ruby-forum.com/t/upgrading-project-to-rails-2-new-generated-functional-tests-fail/127666/2 "2008-02-04T05:12:40Z")

</div>

Problem solved, though not sure exactly how. Migrating more carefully  
following guidelines from

> **[Upgrading to Rails 2.0. A Recipe — SitePoint](https://www.sitepoint.com/upgrading-to-rails-20-a-recipe/)**
>
> Read Upgrading to Rails 2.0. A Recipe and learn with SitePoint. Our web development and design tutorials, courses, and books will teach you HTML, CSS, JavaScript, PHP, Python, and more.

seem to have solved it. Other possible cause was newby use of Git and  
mixing of old and new branches.
