With the exception
of ActiveRecord, all Rails components can be tested by changing to their directory
and executing rake. If all is well, you will see a large number of periods (representing
successful tests), and it will end with no failures or errors:
Finished in 1.444231 seconds.
704 tests, 5475 assertions, 0 failures, 0 errors
ActiveRecord is a bit more difficult to test, due to its dependency on many external
databases. The default task, if no task is provided to rake, is to run the tests for
MySQL, PostgreSQL, SQLite (version 2), and SQLite3.
294 | Chapter 9: Incorporating and Extending Rails
In Rails 2.0, the lesser-used connection adapters have been moved out
of Rails trunk and into gems so that they can be installed if needed.
The connection adapters for Firebird, FrontBase, OpenBase, Oracle,
Microsoft SQL Server, and Sybase now live under /adapters in the
Rails repository.
The gems for these connection adapters are hosted at the Rails gem
server (http://gems.rubyonrails.org) and are named activerecorddbname-
adapter (for example, activerecord-oracle-adapter or
activerecord-sqlserver-adapter), so they can be installed with a command
such as the following:
$ gem install activerecord-sybase-adapter ??“source \
http://gems.rubyonrails.org
Incidentally, IBM maintains its own DB2 adapter for ActiveRecord, so
the old ActiveRecord DB2 connection adapter is gone in Rails 2.
Pages:
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447