# Unit tests, salted hash login

**URL:** <https://www.ruby-forum.com/t/unit-tests-salted-hash-login/75925>\
**Category:** Rails\
**Created:** [March 2, 2006, 9:47pm UTC](https://www.ruby-forum.com/t/unit-tests-salted-hash-login/75925 "2006-03-02T21:47:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/cab0a1/32.png) [@mattias](https://www.ruby-forum.com/u/mattias)\
**Post date:** [March 2, 2006, 9:47pm UTC](https://www.ruby-forum.com/t/unit-tests-salted-hash-login/75925/1 "2006-03-02T21:47:09Z")

</div>

Hello,

I am having some trouble running the unit tests for the salted has login  
generator. I am a bit new to both ruby and rails so I am having a little  
trouble deciphering the error message I get when running ‘rake  
test\_units’. Up till the point where I try to run the unit tests I have  
followed the quick start guide for the salted hash login generator  
([Peak Obsession](http://wiki.rubyonrails.com/rails/pages/SaltedLoginGeneratorQuickstart)),  
my version of rake is 0.7.0. This is my error message

[brasse@keso login-test]$ rake test\_units  
(in /home/brasse/RAILS/login-test)  
psql:db/development\_structure.sql:37: NOTICE: CREATE TABLE will create  
implicit sequence “users\_id\_seq” for “serial” column “users.id”  
psql:db/development\_structure.sql:46: NOTICE: ALTER TABLE / ADD PRIMARY  
KEY will create implicit index “users\_pkey” for table “users”  
/usr/bin/ruby -Ilib:test  
“/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake\_test\_loader.rb”  
“test/unit/localization\_test.rb” “test/unit/user\_test.rb”  
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active\_support/dependencies.rb:200:in  
`const\_missing’: uninitialized constant Test (NameError)  
from ./test/unit/…/test\_helper.rb:5  
from ./test/unit/localization\_test.rb:3  
from  
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake\_test\_loader.rb:5  
from  
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake\_test\_loader.rb:5  
rake aborted!  
Command failed with status (1): [/usr/bin/ruby -Ilib:test  
"/usr/lib/ruby/ge…]

(See full trace by running task with --trace)

If someone could provide me with some clues on how to get the unit tests  
running it would be great. Am I missing some package that I need? Some  
other newbie mistake? All help will be greatly appriciated!

Regrads,  
Mattias

---

<div class="post-metadata">

**Author:** ![mattias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/cab0a1/32.png) [@mattias](https://www.ruby-forum.com/u/mattias)\
**Post date:** [March 2, 2006, 10:05pm UTC](https://www.ruby-forum.com/t/unit-tests-salted-hash-login/75925/2 "2006-03-02T22:05:07Z")

</div>

> I am having some trouble running the unit tests for the salted has login  
> generator. I am a bit new to both ruby and rails so I am having a little  
> trouble deciphering the error message I get when running ‘rake  
> test\_units’. Up till the point where I try to run the unit tests I have  
> followed the quick start guide for the salted hash login generator  
> ([Peak Obsession](http://wiki.rubyonrails.com/rails/pages/SaltedLoginGeneratorQuickstart)),  
> my version of rake is 0.7.0. This is my error message

Did you import the schema into your database? Step 10 of the wiki.  
What type of db are you running?

---

<div class="post-metadata">

**Author:** ![mattias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/cab0a1/32.png) [@mattias](https://www.ruby-forum.com/u/mattias)\
**Post date:** [March 2, 2006, 11:05pm UTC](https://www.ruby-forum.com/t/unit-tests-salted-hash-login/75925/3 "2006-03-02T23:05:30Z")

</div>

Nithin R. wrote:

> > I am having some trouble running the unit tests for the salted has login  
> > generator. I am a bit new to both ruby and rails so I am having a little  
> > trouble deciphering the error message I get when running ‘rake  
> > test\_units’. Up till the point where I try to run the unit tests I have  
> > followed the quick start guide for the salted hash login generator  
> > ([Peak Obsession](http://wiki.rubyonrails.com/rails/pages/SaltedLoginGeneratorQuickstart)),  
> > my version of rake is 0.7.0. This is my error message
> 
> Did you import the schema into your database? Step 10 of the wiki.  
> What type of db are you running?

Yes , I did and I am running postgresql. As far as I can see the unit  
tests manages to create a users table in my test database that look  
exectly like the one in my devel database.

Regards,  
Mattias
