apremdas
2008-Jan-31 07:16 UTC
Upgrading project to Rails 2. New generated functional tests fail
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
apremdas
2008-Feb-04 04:11 UTC
Re: Upgrading project to Rails 2. New generated functional tests fail
Problem solved, though not sure exactly how. Migrating more carefully following guidelines from http://www.sitepoint.com/blogs/2008/01/25/upgrading-to-rails-20-a-recipe/ seem to have solved it. Other possible cause was newby use of Git and mixing of old and new branches. On Jan 31, 7:16 am, apremdas <aprem...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---