# Testing problem

**URL:** <https://www.ruby-forum.com/t/testing-problem/93725>\
**Category:** Rails\
**Created:** [April 7, 2006, 5:01pm UTC](https://www.ruby-forum.com/t/testing-problem/93725 "2006-04-07T17:01:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![regularfry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Post date:** [April 7, 2006, 5:01pm UTC](https://www.ruby-forum.com/t/testing-problem/93725/1 "2006-04-07T17:01:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![regularfry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Post date:** [April 10, 2006, 11:25pm UTC](https://www.ruby-forum.com/t/testing-problem/93725/2 "2006-04-10T23:25:29Z")

</div>

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
