I have submitted a enhancement request to rails (#842) that allows you to have one database user with full permissions to be used during unit tests for setting up the test database and loading up the data from the fixtures and then using a different database user with restricted permissions to run the unit tests. As I state in the request, the web applications that I write that use a database connect to the database with a user that only has select access to most of the tables and insert, update, or delete access to a few tables. This web application user also cannot change the structure of the database in any way. Needless to say, this user cannot do any of the stuff done in setting up the test database. I could set up rails to use a database user that has full permissions in the development and test environments and the restricted user in the production environment, but, then I wouldn''t be able to write unit tests to verify that the restricted user only has the access that I intend. The patch I submitted allows for a test user that will be used in both the Rakefile for cloning the development database structure into the test database and in the fixture code for populating the test database with data. It then closes the connection to the database and opens a new connection with the normal user. This allows me to write unit tests that not only check the correct functioning of the model objects, but also allow me to check that the user cannot do any updates to the database that I don''t want. It also allows me to check that I have done the appropriate grant and revoke statements when I defined the database. I have only tested this with the Postgres database since that is the only setup I have on my machine right now. I have made changes to support MySQL but they have not been tested. I would appreciate any comments. Kim