# Test and DB Functions

**URL:** <https://www.ruby-forum.com/t/test-and-db-functions/115406>\
**Category:** Rails\
**Created:** [September 24, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/test-and-db-functions/115406 "2007-09-24T23:50:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonwold](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e36b37/32.png) [@jasonwold](https://www.ruby-forum.com/u/jasonwold)\
**Post date:** [September 24, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/test-and-db-functions/115406/1 "2007-09-24T23:50:37Z")

</div>

I am using the DBFunction plugin writen by Mark Van H.,  
[http://agilewebdevelopment.com/plugins/activerecord\_database\_functions](http://agilewebdevelopment.com/plugins/activerecord_database_functions)

It works wonderfully but I’m having an issue with testing. My  
development postgres database contains the necessary functions but they  
are missing from my test database. I’ve got a sql file which adds the  
functions to the db but something is removing them.

Here’s what I’m experiencing.

1 I run my sql file and add the functions.  
2 Run an individual unit-test :Pass  
3 Run all test :Fail - No function matches the given name. And when I  
check the database the functions are indeed missing.

Any ideas?
