Configuring tests to run with no database

Hi. I’m writing a very small rails app to display a form that submits to
a 3rd party web service. Because the 3rd party service handles data
storage, I don’t need a database. I chose rails to take advantage of
everything it offers besides ActiveRecord, but it seems that I can’t run
the tests without a database running, even though I’m not using a
database.

I’ve got unit tests running without the database by simply not using
rake to run them. The functional tests, however, come with very useful
services like TestRequest/TestRespsonse and all of the tag assertions,
so I’m using that framework. The fact that it needs to hook into the
database adds precious seconds to every single test run. Though that may
seem trivial, it’s actually quite painful if you’re using a TDD cycle
with very small steps (which I do).

Can anybody tell me how to configure the functional tests to run without
requiring a database?

Thanks,
David

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 14, 2005, at 5:05 AM, David C. wrote:

tag assertions, so I’m using that framework. The fact that it needs
to hook into the database adds precious seconds to every single
test run. Though that may seem trivial, it’s actually quite painful
if you’re using a TDD cycle with very small steps (which I do).

Can anybody tell me how to configure the functional tests to run
without requiring a database?

Don’t load Active Record in config/environment.rb and remove
require ‘activerecord/fixtures’
and the fixtures settings from test/test_helper.rb

That probably won’t be enough, but it’s a start.

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDeNm6AQHALep9HFYRAp3TAJ9hi6K8GD5GDRZ3rhMMKAmb01b+UgCg2lWj
40qfNQ8BIjljw0dWt5zWTVI=
=Gkow
-----END PGP SIGNATURE-----