Hello, I''ve been searching for an answer and couldn''t find one -- so I thought I''d post my question. I am using rails 2.3.2, Restful_Authentications and Role_Requirement. I haven''t created any users yet or limited any models just yet. When running rake I get the following failure: 1) Failure: test_should_create_user(UserTest) [/test/unit/user_test.rb:12:in `test_should_create_user'' /test/unit/user_test.rb:10:in `test_should_create_user'']: Name has already been taken. <false> is not true. But I also get: /usr/local/bin/ruby -I"*/lib" -I"*/test" "/usr/local/lib/ruby/gems/1.8/ gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/functional/ categories_controller_test.rb" "test/functional/ products_controller_test.rb" "test/functional/ sessions_controller_test.rb" "test/functional/ users_controller_test.rb" ./test/functional/categories_controller_test.rb:8: undefined method `fixtures'' for CategoriesControllerTest:Class (NoMethodError) from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ rake_test_loader.rb:5:in `load'' from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ rake_test_loader.rb:5 from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ rake_test_loader.rb:5:in `each'' from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ rake_test_loader.rb:5 /usr/local/bin/ruby -I"*/lib" -I"*/test" "/usr/local/lib/ruby/gems/1.8/ gems/rake-0.8.4/lib/rake/rake_test_loader.rb" Errors running test:units and test:functionals! Does anyone know how I can fix this? Thanks, Elle --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
What version of Restful_Authentication are you using? Can you post perhaps the top 10 lines of your test/unit/user_test.rb and test/functional/users_controller_test.rb files? On Mon, Mar 30, 2009 at 6:04 PM, elle <waznelle-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hello, > > I''ve been searching for an answer and couldn''t find one -- so I > thought I''d post my question. > > I am using rails 2.3.2, Restful_Authentications and Role_Requirement. > I haven''t created any users yet or limited any models just yet. When > running rake I get the following failure: > > 1) Failure: > test_should_create_user(UserTest) > [/test/unit/user_test.rb:12:in `test_should_create_user'' > /test/unit/user_test.rb:10:in `test_should_create_user'']: > Name has already been taken. > <false> is not true. > > > But I also get: > /usr/local/bin/ruby -I"*/lib" -I"*/test" "/usr/local/lib/ruby/gems/1.8/ > gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/functional/ > categories_controller_test.rb" "test/functional/ > products_controller_test.rb" "test/functional/ > sessions_controller_test.rb" "test/functional/ > users_controller_test.rb" > ./test/functional/categories_controller_test.rb:8: undefined method > `fixtures'' for CategoriesControllerTest:Class (NoMethodError) > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > rake_test_loader.rb:5:in `load'' > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > rake_test_loader.rb:5 > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > rake_test_loader.rb:5:in `each'' > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > rake_test_loader.rb:5 > /usr/local/bin/ruby -I"*/lib" -I"*/test" "/usr/local/lib/ruby/gems/1.8/ > gems/rake-0.8.4/lib/rake/rake_test_loader.rb" > Errors running test:units and test:functionals! > > Does anyone know how I can fix this? > > Thanks, > Elle > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Not sure of version -- installed plugin about 3 days ago. ----------------------------------- test/unit/user_test.rb: require File.dirname(__FILE__) + ''/../test_helper'' class UserTest < ActiveSupport::TestCase fixtures :users def test_should_create_user assert_difference ''User.count'' do user = create_user assert !user.new_record?, "# {user.errors.full_messages.to_sentence}" end end ------------------------ test/functional/users_controller_test.rb: require File.dirname(__FILE__) + ''/../test_helper'' require ''users_controller'' # Re-raise errors caught by the controller. class UsersController; def rescue_action(e) raise e end; end class UsersControllerTest < ActionController::TestCase fixtures :users ----------------------- I also forgot to say that I have installed exception_notification and resource-controller plugins. Thanks, Elle On Mar 31, 10:40 am, Ryan Waldron <r...-L2nCScK6t0HQT0dZR+AlfA@public.gmane.org> wrote:> What version of Restful_Authentication are you using? Can you post perhaps > the top 10 lines of your test/unit/user_test.rb and > test/functional/users_controller_test.rb files? > > > > On Mon, Mar 30, 2009 at 6:04 PM, elle <wazne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello, > > > I''ve been searching for an answer and couldn''t find one -- so I > > thought I''d post my question. > > > I am using rails 2.3.2, Restful_Authentications and Role_Requirement. > > I haven''t created any users yet or limited any models just yet. When > > running rake I get the following failure: > > > 1) Failure: > > test_should_create_user(UserTest) > > [/test/unit/user_test.rb:12:in `test_should_create_user'' > > /test/unit/user_test.rb:10:in `test_should_create_user'']: > > Name has already been taken. > > <false> is not true. > > > But I also get: > > /usr/local/bin/ruby -I"*/lib" -I"*/test" "/usr/local/lib/ruby/gems/1.8/ > > gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/functional/ > > categories_controller_test.rb" "test/functional/ > > products_controller_test.rb" "test/functional/ > > sessions_controller_test.rb" "test/functional/ > > users_controller_test.rb" > > ./test/functional/categories_controller_test.rb:8: undefined method > > `fixtures'' for CategoriesControllerTest:Class (NoMethodError) > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > rake_test_loader.rb:5:in `load'' > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > rake_test_loader.rb:5 > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > rake_test_loader.rb:5:in `each'' > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > rake_test_loader.rb:5 > > /usr/local/bin/ruby -I"*/lib" -I"*/test" "/usr/local/lib/ruby/gems/1.8/ > > gems/rake-0.8.4/lib/rake/rake_test_loader.rb" > > Errors running test:units and test:functionals! > > > Does anyone know how I can fix this? > > > Thanks, > > Elle--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Take a look at this ticket: http://rails_security.lighthouseapp.com/projects/15332/tickets/44-undefined-method-fixtures and this (short) thread a few days ago: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/5d00638a5f4ed430/f0ba10b7851d78ae?lnk=gst&q=undefined+method+#f0ba10b7851d78ae Not a solution, but at least some explanation of what''s happening. On Mon, Mar 30, 2009 at 6:56 PM, elle <waznelle-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Not sure of version -- installed plugin about 3 days ago. > > ----------------------------------- > test/unit/user_test.rb: > > require File.dirname(__FILE__) + ''/../test_helper'' > > class UserTest < ActiveSupport::TestCase > fixtures :users > > def test_should_create_user > assert_difference ''User.count'' do > user = create_user > assert !user.new_record?, "# > {user.errors.full_messages.to_sentence}" > end > end > > ------------------------ > test/functional/users_controller_test.rb: > > require File.dirname(__FILE__) + ''/../test_helper'' > require ''users_controller'' > > # Re-raise errors caught by the controller. > class UsersController; def rescue_action(e) raise e end; end > > class UsersControllerTest < ActionController::TestCase > fixtures :users > > ----------------------- > > I also forgot to say that I have installed exception_notification and > resource-controller plugins. > > > Thanks, > Elle > > > On Mar 31, 10:40 am, Ryan Waldron <r...-L2nCScK6t0HQT0dZR+AlfA@public.gmane.org> wrote: > > What version of Restful_Authentication are you using? Can you post > perhaps > > the top 10 lines of your test/unit/user_test.rb and > > test/functional/users_controller_test.rb files? > > > > > > > > On Mon, Mar 30, 2009 at 6:04 PM, elle <wazne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hello, > > > > > I''ve been searching for an answer and couldn''t find one -- so I > > > thought I''d post my question. > > > > > I am using rails 2.3.2, Restful_Authentications and Role_Requirement. > > > I haven''t created any users yet or limited any models just yet. When > > > running rake I get the following failure: > > > > > 1) Failure: > > > test_should_create_user(UserTest) > > > [/test/unit/user_test.rb:12:in `test_should_create_user'' > > > /test/unit/user_test.rb:10:in `test_should_create_user'']: > > > Name has already been taken. > > > <false> is not true. > > > > > But I also get: > > > /usr/local/bin/ruby -I"*/lib" -I"*/test" "/usr/local/lib/ruby/gems/1.8/ > > > gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/functional/ > > > categories_controller_test.rb" "test/functional/ > > > products_controller_test.rb" "test/functional/ > > > sessions_controller_test.rb" "test/functional/ > > > users_controller_test.rb" > > > ./test/functional/categories_controller_test.rb:8: undefined method > > > `fixtures'' for CategoriesControllerTest:Class (NoMethodError) > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > rake_test_loader.rb:5:in `load'' > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > rake_test_loader.rb:5 > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > rake_test_loader.rb:5:in `each'' > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > rake_test_loader.rb:5 > > > /usr/local/bin/ruby -I"*/lib" -I"*/test" "/usr/local/lib/ruby/gems/1.8/ > > > gems/rake-0.8.4/lib/rake/rake_test_loader.rb" > > > Errors running test:units and test:functionals! > > > > > Does anyone know how I can fix this? > > > > > Thanks, > > > Elle > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
My user_test.rb already had: class UserTest < ActiveSupport::TestCase Instead of class UserTest < Test::Unit::TestCase And changing it to class UserTest < ActiveRecord::TestCase did not change the error I am getting. Is there something else I''m supposed to be doing? Thanks On Mar 31, 11:17 am, Ryan Waldron <r...-L2nCScK6t0HQT0dZR+AlfA@public.gmane.org> wrote:> Take a look at this ticket: > > http://rails_security.lighthouseapp.com/projects/15332/tickets/44-und... > > and this (short) thread a few days ago: > > http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/... > > Not a solution, but at least some explanation of what''s happening. > > > > On Mon, Mar 30, 2009 at 6:56 PM, elle <wazne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Not sure of version -- installed plugin about 3 days ago. > > > ----------------------------------- > > test/unit/user_test.rb: > > > require File.dirname(__FILE__) + ''/../test_helper'' > > > class UserTest < ActiveSupport::TestCase > > fixtures :users > > > def test_should_create_user > > assert_difference ''User.count'' do > > user = create_user > > assert !user.new_record?, "# > > {user.errors.full_messages.to_sentence}" > > end > > end > > > ------------------------ > > test/functional/users_controller_test.rb: > > > require File.dirname(__FILE__) + ''/../test_helper'' > > require ''users_controller'' > > > # Re-raise errors caught by the controller. > > class UsersController; def rescue_action(e) raise e end; end > > > class UsersControllerTest < ActionController::TestCase > > fixtures :users > > > ----------------------- > > > I also forgot to say that I have installed exception_notification and > > resource-controller plugins. > > > Thanks, > > Elle > > > On Mar 31, 10:40 am, Ryan Waldron <r...-L2nCScK6t0HQT0dZR+AlfA@public.gmane.org> wrote: > > > What version of Restful_Authentication are you using? Can you post > > perhaps > > > the top 10 lines of your test/unit/user_test.rb and > > > test/functional/users_controller_test.rb files? > > > > On Mon, Mar 30, 2009 at 6:04 PM, elle <wazne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hello, > > > > > I''ve been searching for an answer and couldn''t find one -- so I > > > > thought I''d post my question. > > > > > I am using rails 2.3.2, Restful_Authentications and Role_Requirement. > > > > I haven''t created any users yet or limited any models just yet. When > > > > running rake I get the following failure: > > > > > 1) Failure: > > > > test_should_create_user(UserTest) > > > > [/test/unit/user_test.rb:12:in `test_should_create_user'' > > > > /test/unit/user_test.rb:10:in `test_should_create_user'']: > > > > Name has already been taken. > > > > <false> is not true. > > > > > But I also get: > > > > /usr/local/bin/ruby -I"*/lib" -I"*/test" "/usr/local/lib/ruby/gems/1.8/ > > > > gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/functional/ > > > > categories_controller_test.rb" "test/functional/ > > > > products_controller_test.rb" "test/functional/ > > > > sessions_controller_test.rb" "test/functional/ > > > > users_controller_test.rb" > > > > ./test/functional/categories_controller_test.rb:8: undefined method > > > > `fixtures'' for CategoriesControllerTest:Class (NoMethodError) > > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > > rake_test_loader.rb:5:in `load'' > > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > > rake_test_loader.rb:5 > > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > > rake_test_loader.rb:5:in `each'' > > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > > rake_test_loader.rb:5 > > > > /usr/local/bin/ruby -I"*/lib" -I"*/test" "/usr/local/lib/ruby/gems/1.8/ > > > > gems/rake-0.8.4/lib/rake/rake_test_loader.rb" > > > > Errors running test:units and test:functionals! > > > > > Does anyone know how I can fix this? > > > > > Thanks, > > > > Elle--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The next thing is to get someone more clever than me to chime in with a real answer. :) On Mon, Mar 30, 2009 at 7:43 PM, elle <waznelle-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > My user_test.rb already had: > class UserTest < ActiveSupport::TestCase > Instead of > class UserTest < Test::Unit::TestCase > > And changing it to > class UserTest < ActiveRecord::TestCase > did not change the error I am getting. > > Is there something else I''m supposed to be doing? > > Thanks > > On Mar 31, 11:17 am, Ryan Waldron <r...-L2nCScK6t0HQT0dZR+AlfA@public.gmane.org> wrote: > > Take a look at this ticket: > > > > http://rails_security.lighthouseapp.com/projects/15332/tickets/44-und... > > > > and this (short) thread a few days ago: > > > > http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/... > > > > Not a solution, but at least some explanation of what''s happening. > > > > > > > > On Mon, Mar 30, 2009 at 6:56 PM, elle <wazne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Not sure of version -- installed plugin about 3 days ago. > > > > > ----------------------------------- > > > test/unit/user_test.rb: > > > > > require File.dirname(__FILE__) + ''/../test_helper'' > > > > > class UserTest < ActiveSupport::TestCase > > > fixtures :users > > > > > def test_should_create_user > > > assert_difference ''User.count'' do > > > user = create_user > > > assert !user.new_record?, "# > > > {user.errors.full_messages.to_sentence}" > > > end > > > end > > > > > ------------------------ > > > test/functional/users_controller_test.rb: > > > > > require File.dirname(__FILE__) + ''/../test_helper'' > > > require ''users_controller'' > > > > > # Re-raise errors caught by the controller. > > > class UsersController; def rescue_action(e) raise e end; end > > > > > class UsersControllerTest < ActionController::TestCase > > > fixtures :users > > > > > ----------------------- > > > > > I also forgot to say that I have installed exception_notification and > > > resource-controller plugins. > > > > > Thanks, > > > Elle > > > > > On Mar 31, 10:40 am, Ryan Waldron <r...-L2nCScK6t0HQT0dZR+AlfA@public.gmane.org> wrote: > > > > What version of Restful_Authentication are you using? Can you post > > > perhaps > > > > the top 10 lines of your test/unit/user_test.rb and > > > > test/functional/users_controller_test.rb files? > > > > > > On Mon, Mar 30, 2009 at 6:04 PM, elle <wazne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Hello, > > > > > > > I''ve been searching for an answer and couldn''t find one -- so I > > > > > thought I''d post my question. > > > > > > > I am using rails 2.3.2, Restful_Authentications and > Role_Requirement. > > > > > I haven''t created any users yet or limited any models just yet. > When > > > > > running rake I get the following failure: > > > > > > > 1) Failure: > > > > > test_should_create_user(UserTest) > > > > > [/test/unit/user_test.rb:12:in `test_should_create_user'' > > > > > /test/unit/user_test.rb:10:in `test_should_create_user'']: > > > > > Name has already been taken. > > > > > <false> is not true. > > > > > > > But I also get: > > > > > /usr/local/bin/ruby -I"*/lib" -I"*/test" > "/usr/local/lib/ruby/gems/1.8/ > > > > > gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/functional/ > > > > > categories_controller_test.rb" "test/functional/ > > > > > products_controller_test.rb" "test/functional/ > > > > > sessions_controller_test.rb" "test/functional/ > > > > > users_controller_test.rb" > > > > > ./test/functional/categories_controller_test.rb:8: undefined method > > > > > `fixtures'' for CategoriesControllerTest:Class (NoMethodError) > > > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > > > rake_test_loader.rb:5:in `load'' > > > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > > > rake_test_loader.rb:5 > > > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > > > rake_test_loader.rb:5:in `each'' > > > > > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/ > > > > > rake_test_loader.rb:5 > > > > > /usr/local/bin/ruby -I"*/lib" -I"*/test" > "/usr/local/lib/ruby/gems/1.8/ > > > > > gems/rake-0.8.4/lib/rake/rake_test_loader.rb" > > > > > Errors running test:units and test:functionals! > > > > > > > Does anyone know how I can fix this? > > > > > > > Thanks, > > > > > Elle > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---