Further Reading | 295
- Verify the database connection information for the unit tests. ActiveRecord tests
require two database connections per adapter, to verify that ActiveRecord is able
to properly manage multiple simultaneous connections. If needed, modify the
connection specifications in activerecord/test/connections/native_adaptername/
connection.rb. - Create the unit test databases for MySQL and PostgreSQL. The SQLite and
SQLite3 databases will be automatically created upon first run, as they are
backed by a single file per database. For a default configuration (no modifica-
tions to the above connection specifications), run the following Rake tasks from
theactiverecord directory:
$ rake build_mysql_databases
$ rake build_postgresql_databases
For more complicated configurations, create the databases specified in the pre-
ceding connection files, and ensure that the user specified in those files has full
access to those databases, or you will get permission errors. - Change to theactiverecorddirectory and runrake. The tests should run on all
four connection adapters with no failures or errors. Tests for individual adapters
can be run with separate Rake tasks such astest_mysql; runrake -Tfor a list of
all recognized tasks.
Further Reading
Railscastshas produced a screencast detailing the process of contributing to Rails.
It is available athttp://railscasts.com/episodes/50.
Notes from Josh Susser’s talk on contributing to Rails are posted athttp://edgibbs.com/
2007/04/23/josh-susser-on-contributing-to-rails/.