Test errors


#1

I’m working on learning user auth and ran a test/unit/test.rb and seem
to
have stumbled across some errors. This is from a tutorial on the web
and I
pretty much copied the code and checked syntax so not sure where it’s
wrong. I thought I’d throw it out since I"m new to ROR and the error
didn’t
look too bad ;), perhaps someone would have a better understanding of
what
it’s saying.

  1. Error:
    est_send_new_password(UserTest):
    ameError: uninitialized constant Notifications
    c:/instantrails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1
    /lib/active_support/dependencies.
    b:123:in const_missing' c:/instantrails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1 /lib/active_support/dependencies. b:131:inconst_missing’
    c:/instantrails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1
    /lib/active_support/dependencies.
    b:133:in const_missing' C:/InstantRails/rails_apps/userauth/config/../app/models/user.rb:34:insend_new_password’
    user_test.rb:130:in `test_send_new_password’

0 tests, 56 assertions, 0 failures, 1 errors

TIA
Stuart


#2

NameError: uninitialized constant Notifications

Means that you’re trying to use the constant (probably a class)
Notifications without having defined it.

If you look at your stack, you’ll see files and line numbers - looks
like

== user_test.rb:130:in `test_send_new_password’ == is where your bug
most
likely resides


From: removed_email_address@domain.invalid
[mailto:removed_email_address@domain.invalid] On Behalf Of Dark A.
Sent: Wednesday, June 07, 2006 3:17 PM
To: rails
Subject: [Rails] Test errors

I’m working on learning user auth and ran a test/unit/test.rb and seem
to
have stumbled across some errors. This is from a tutorial on the web
and I
pretty much copied the code and checked syntax so not sure where it’s
wrong.
I thought I’d throw it out since I"m new to ROR and the error didn’t
look
too bad ;), perhaps someone would have a better understanding of what
it’s
saying.

  1. Error:
    est_send_new_password(UserTest):
    ameError: uninitialized constant Notifications

c:/instantrails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_s
upport/dependencies.
b:123:in `const_missing’

c:/instantrails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_s
upport/dependencies.
b:131:in `const_missing’

c:/instantrails/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_s
upport/dependencies.
b:133:in const_missing' C:/InstantRails/rails_apps/userauth/config/../app/models/user.rb:34:insend_new_password’
user_test.rb:130:in `test_send_new_password’

0 tests, 56 assertions, 0 failures, 1 errors

TIA
Stuart