Restful_Authentication test failure

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:intest_should_create_user’]:
    Name has already been taken.
    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:inload’
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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs