|
Revision 4, 0.9 kB
(checked in by david, 4 years ago)
|
Initial
|
| Line | |
|---|
| 1 |
== Running with Rake |
|---|
| 2 |
|
|---|
| 3 |
The easiest way to run the unit tests is through Rake. The default task runs |
|---|
| 4 |
the entire test suite for all classes. For more information, checkout the |
|---|
| 5 |
full array of rake tasks with "rake -T" |
|---|
| 6 |
|
|---|
| 7 |
Rake can be found at http://rake.rubyforge.org |
|---|
| 8 |
|
|---|
| 9 |
== Running by hand |
|---|
| 10 |
|
|---|
| 11 |
If you only want to run a single test suite, or don't want to bother with Rake, |
|---|
| 12 |
you can do so with something like: |
|---|
| 13 |
|
|---|
| 14 |
ruby controller/base_test.rb |
|---|
| 15 |
|
|---|
| 16 |
== Dependency on ActiveRecord and database setup |
|---|
| 17 |
|
|---|
| 18 |
Test cases in test/controller/active_record_assertions.rb depend on having |
|---|
| 19 |
activerecord installed and configured in a particular way. See comment in the |
|---|
| 20 |
test file itself for details. If ActiveRecord is not in |
|---|
| 21 |
actionpack/../activerecord directory, these tests are skipped. If activerecord |
|---|
| 22 |
is installed, but not configured as expected, the tests will fail. |
|---|
| 23 |
|
|---|
| 24 |
Other tests are runnable from a fresh copy of actionpack without any configuration. |
|---|
| 25 |
|
|---|