How can I inspect the test env database?

I'm wanting to be able to inspect what is actually getting written to
the test database when/after tests are ran.

However I do no not know how to do this. Since after each test is ran
the DB is wiped. How can I somehow prevent the BD from getting
cleared out after running a test so I can manually check it's content?

I am using MySQL, Shoulda and Factory Girl.

Thank you.
Elliott G

try this from the command line
tail -f log/test.log
...and run your tests from another console
hope it helps!

Thanks for the reply Auvi.

I have been tailing the test log. It is showing me that the records I
am watching are getting update on the test db as expected. But when I
do a subsequent AR find query to pull them out and run assertions on
them they do not match what the test log was showing. That's why I am
trying to get a peek at the db itself.

Is it poor form/problematic to run AR find queries in functional
tests?

Thanks, EG

I'm not sure how Shoulda works, but in Cucumber, I can turn off
transactional fixtures which retains state in the test database
between scenarios.

The danger with this is that tests may pass or fail based on previous
state, when each scenario should really be run in isolation.

Eric

Thanks E.Litwin

That worked like a charm.

I just changed self.use_transactional_fixtures = false in test/
test_helper.rb from the default true to false.

Thanks again, Elliott G