About test database

i have a conclusion to make sure,that is : when testing codes, only
the fixtures data are stored in the test database table after running
the test and the model saved during runing test method is not stored
in the test database table? For example:
#########
def test_save
user=User.new(…)
user.save
end
##########
After running the test method,the user is not stored in the test
database table?
right?

On 30 Oct 2008, at 16:37, daociyiyou wrote:

##########
After running the test method,the user is not stored in the test
database table?
right?

Sort of. It is stored in the test database, but the entire test runs
within a transaction, which is rolled back at the end of the test.

Fred

Sort of. It is stored in the test database, but the entire test runs
within a transaction, which is rolled back at the end of the test.

Fred

But rolled back at the end of this test method or the entire
controller test? You means I need not consider if the user is saved in
the test database table in the following test methods because the user
is not in the database at that time?
If the user is still in the database in the following test methods.i
need to consider it because of my application’s logic.

On Oct 31, 2:09 am, daociyiyou [email protected] wrote:

need to consider it because of my application’s logic.
Take a look in your app’s test.log and you’ll see for yourself.

Fred

anyone help me?

On Oct 31, 4:31 pm, Frederick C. [email protected]
wrote:

is not in the database at that time?
If the user is still in the database in the following test methods.i
need to consider it because of my application’s logic.

Take a look in your app’s test.log and you’ll see for yourself.

Fred

Thank you ,i have found the following words:[4;36;1mSQL (0.032000)
[0m [0;1mROLLBACK [0m