Has anyone successfully run the unit and functional tests that are
pre-generated with the ‘acts as authenticated’ plugin ?
I’m having huge amounts of problems and it’s not helped by the fact that
I’m a n00b to Rails and can’t tell if I’ve made some fundamental error
setting things up.
Sequence of events was
- Generate users scaffold
- Generate authenticate controller using plugin
- alter application.rb so that almost everything requires a logon
- Run rake
I quickly discovered that there was no way that
‘test_should_not_rehash_password’ would run successfully in the unit
tests, so I abandoned that (commented it out).
On a re-run I found so many errors in other parts of of the app (it’s a
team project) that I had to run just the ‘users’ functional test on its
Virtually every test failed.
I thought my mods to application.rb might be the root of the problem,
but commenting them out got me no further, and replicating that
functionality within the ‘setup’ method of the functional test didn’t
help either. I also took a few guesses at things that might be missing
from the artificial test environment (I used a few includes in other
words) but again no luck.
I think there is probably something simple I’m missing that will make
these tests run out of the box, but I’m at a loss to know what it is.
Can anyone help ?