Forum: Ruby on Rails Test errors

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dark A. (Guest)
on 2006-06-08 05:18
(Received via mailing list)
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:in `const_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:in
`send_new_password'
   user_test.rb:130:in `test_send_new_password'

0 tests, 56 assertions, 0 failures, 1 errors

TIA
Stuart
Daniel H. (Guest)
on 2006-06-08 08:45
(Received via mailing list)
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:in
`send_new_password'
   user_test.rb:130:in `test_send_new_password'

0 tests, 56 assertions, 0 failures, 1 errors

TIA
Stuart
This topic is locked and can not be replied to.