Testing problem


#1

Hi all,

In Rails 1.0, why would running rake test_functional be different from
running ruby test/functional/my_tests.rb? I’ve got a set of tests that
pass fine when run individually, but fail when they’re run from rake.
Anyone else seen this? I don’t know if it’s relevant, but I’m doing ERb
template rendering in a $SAFE binding… Seems mighty odd.


#2

Hi,

you seem to have a problem with your database. At least I had exactly
the
same problem. Check whether your database supports rollbacks (if you
have
transactional fixtures activated) and also make sure that there is no
data
left behind on the test db, when a single test is done.

In Rails 1.0, why would running rake test_functional be different from

running ruby test/functional/my_tests.rb?

If everything works it shouldn’t matter whether you run your tests
manually
or let rake do it. Rake just starts the tests in an “alphabetical” way,
if
you know what I mean.

Hope this helps,

Markus