I''m using rails 2.0.2 now. Here is the step for generate the error 1. Create rails project name demo "rails demo" 2. I create model name "Tester" using command "ruby script/generate model Tester name:string description:text" 3. create database (after change username and password) "rake db:create:all" 4. migrate database, both development and test "rake db:migrate" "rake db:migrate RAILS_ENV=test" 5. unit test the tester model "ruby test/unit/tester_test.rb" Here is the error i''ve got everytime D:\web\Sites\demo>ruby test/unit/tester_test.rb Loaded suite test/unit/tester_test Started .E.... Finished in 0.234 seconds. 1) Error: testers(ActionController::TestCase): ArgumentError: wrong number of arguments (0 for 1) D:/web/Sites/demo/vendor/rails/actionpack/lib/action_controller/ test_case.rb:48:in `initialize'' D:/web/Sites/demo/vendor/rails/actionpack/lib/action_controller/ test_case.rb:48:in `new'' D:/web/Sites/demo/vendor/rails/actionpack/lib/action_controller/ test_case.rb:48:in `setup_without_fixtures'' D:/web/Sites/demo/vendor/rails/activerecord/lib/active_record/ fixtures.rb:979:in `full_setup'' D:/web/Sites/demo/vendor/rails/activerecord/lib/../../ activesupport/lib/active_support/testing/default.rb:7:in `run'' 6 tests, 1 assertions, 0 failures, 1 errors I don''t know how to fix this error (wrong number of arguments) What i''ve tried is test when using other model name. e.g. Post, Comment, User, Image, ..., etc. All of them not have this problem when test. Only model name as "Tester" And this model name is work fine in rail 1.2.6 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Perhaps use a different word other than Tester if it''s going to cause issues? http://thesaurus.reference.com/browse/Tester?r=76 On Dec 21, 2007 2:39 PM, gampolt <gampolt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m using rails 2.0.2 now. Here is the step for generate the error > 1. Create rails project name demo > "rails demo" > 2. I create model name "Tester" using command > "ruby script/generate model Tester name:string description:text" > 3. create database (after change username and password) > "rake db:create:all" > 4. migrate database, both development and test > "rake db:migrate" > "rake db:migrate RAILS_ENV=test" > 5. unit test the tester model > "ruby test/unit/tester_test.rb" > Here is the error i''ve got everytime > D:\web\Sites\demo>ruby test/unit/tester_test.rb > Loaded suite test/unit/tester_test > Started > .E.... > Finished in 0.234 seconds. > > 1) Error: > testers(ActionController::TestCase): > ArgumentError: wrong number of arguments (0 for 1) > D:/web/Sites/demo/vendor/rails/actionpack/lib/action_controller/ > test_case.rb:48:in `initialize'' > D:/web/Sites/demo/vendor/rails/actionpack/lib/action_controller/ > test_case.rb:48:in `new'' > D:/web/Sites/demo/vendor/rails/actionpack/lib/action_controller/ > test_case.rb:48:in `setup_without_fixtures'' > D:/web/Sites/demo/vendor/rails/activerecord/lib/active_record/ > fixtures.rb:979:in `full_setup'' > D:/web/Sites/demo/vendor/rails/activerecord/lib/../../ > activesupport/lib/active_support/testing/default.rb:7:in `run'' > > 6 tests, 1 assertions, 0 failures, 1 errors > > I don''t know how to fix this error (wrong number of arguments) > > What i''ve tried is test when using other model name. e.g. Post, > Comment, User, Image, ..., etc. All of them not have this problem > when > test. > Only model name as "Tester" > And this model name is work fine in rail 1.2.6 > > >-- Ryan Bigg http://www.frozenplague.net --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''ve got the same problem in Rails 2.0.2. Model name is Testimonial. Site works fine but tests get confused. So, does anyone have ideas for an alternate word? If it worked in Rails 1.x then it sounds like a regression in Rails 2.0. Matt On Dec 20, 10:18 pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Perhaps use a different word other than Tester if it''s going to cause > issues? > > http://thesaurus.reference.com/browse/Tester?r=76 > > On Dec 21, 2007 2:39 PM, gampolt <gamp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > I''m using rails 2.0.2 now. Here is the step for generate the error > > 1. Create rails project name demo > > "rails demo" > > 2. I create model name "Tester" using command > > "ruby script/generate model Tester name:string description:text" > > 3. create database (after change username and password) > > "rake db:create:all" > > 4. migrate database, both development and test > > "rake db:migrate" > > "rake db:migrate RAILS_ENV=test" > > 5. unit test the tester model > > "ruby test/unit/tester_test.rb" > > Here is the error i''ve got everytime > > D:\web\Sites\demo>ruby test/unit/tester_test.rb > > Loaded suite test/unit/tester_test > > Started > > .E.... > > Finished in 0.234 seconds. > > > 1) Error: > > testers(ActionController::TestCase): > > ArgumentError: wrong number of arguments (0 for 1) > > D:/web/Sites/demo/vendor/rails/actionpack/lib/action_controller/ > > test_case.rb:48:in `initialize'' > > D:/web/Sites/demo/vendor/rails/actionpack/lib/action_controller/ > > test_case.rb:48:in `new'' > > D:/web/Sites/demo/vendor/rails/actionpack/lib/action_controller/ > > test_case.rb:48:in `setup_without_fixtures'' > > D:/web/Sites/demo/vendor/rails/activerecord/lib/active_record/ > > fixtures.rb:979:in `full_setup'' > > D:/web/Sites/demo/vendor/rails/activerecord/lib/../../ > > activesupport/lib/active_support/testing/default.rb:7:in `run'' > > > 6 tests, 1 assertions, 0 failures, 1 errors > > > I don''t know how to fix this error (wrong number of arguments) > > > What i''ve tried is test when using other model name. e.g. Post, > > Comment, User, Image, ..., etc. All of them not have this problem > > when > > test. > > Only model name as "Tester" > > And this model name is work fine in rail 1.2.6 > > -- > Ryan Bigghttp://www.frozenplague.net--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---