RUNNING_UNIT_TESTS.rdoc 849 字节
Newer Older
1 2 3 4
== Running with Rake

The easiest way to run the unit tests is through Rake. The default task runs
the entire test suite for all classes. For more information, checkout the
F
Fatos Morina 已提交
5
full array of rake tasks with <tt>rake -T</tt>
6

A
aycabta 已提交
7
Rake can be found at https://ruby.github.io/rake/.
8 9 10

== Running by hand

F
Fatos Morina 已提交
11
Run a single test suite:
12 13 14 15 16 17 18 19 20

   rake test TEST=path/to/test.rb

which can be further narrowed down to one test:

   rake test TEST=path/to/test.rb TESTOPTS="--name=test_something"

== Dependency on Active Record and database setup

F
Fatos Morina 已提交
21 22 23 24
Test cases in the +test/activerecord/+ directory depend on having
activerecord+ and +sqlite3+ installed. If Active Record is not in
actionview/../activerecord+ directory, or the +sqlite3+ Ruby gem is not installed,
  these tests are skipped.
25
Other tests are runnable from a fresh copy of actionview without any configuration.
26