Skip to content
Newer
Older
100644 40 lines (22 sloc) 1.24 KB
f9e3d4b @jonleighton Refactor Active Record test connection setup. Please see the RUNNING_…
jonleighton authored Jun 4, 2011
1 == Configure databases
db045db @dhh Initial
dhh authored Nov 24, 2004
2
f9e3d4b @jonleighton Refactor Active Record test connection setup. Please see the RUNNING_…
jonleighton authored Jun 4, 2011
3 Copy test/config.example.yml to test/config.yml and edit as needed. Or just run the tests for
4 the first time, which will do the copy automatically and use the default (sqlite3).
db045db @dhh Initial
dhh authored Nov 24, 2004
5
f9e3d4b @jonleighton Refactor Active Record test connection setup. Please see the RUNNING_…
jonleighton authored Jun 4, 2011
6 You can build postgres and mysql databases using the build_postgresql and build_mysql rake tasks.
db045db @dhh Initial
dhh authored Nov 24, 2004
7
f9e3d4b @jonleighton Refactor Active Record test connection setup. Please see the RUNNING_…
jonleighton authored Jun 4, 2011
8 == Running the tests
db045db @dhh Initial
dhh authored Nov 24, 2004
9
f9e3d4b @jonleighton Refactor Active Record test connection setup. Please see the RUNNING_…
jonleighton authored Jun 4, 2011
10 You can run a particular test file from the command line, e.g.
db045db @dhh Initial
dhh authored Nov 24, 2004
11
fb1fd61 @jonleighton Add support for using an ARCONFIG environment variable to specify the…
jonleighton authored Jun 12, 2011
12 $ ruby -Itest test/cases/base_test.rb
db045db @dhh Initial
dhh authored Nov 24, 2004
13
f9e3d4b @jonleighton Refactor Active Record test connection setup. Please see the RUNNING_…
jonleighton authored Jun 4, 2011
14 To run a specific test:
db045db @dhh Initial
dhh authored Nov 24, 2004
15
fb1fd61 @jonleighton Add support for using an ARCONFIG environment variable to specify the…
jonleighton authored Jun 12, 2011
16 $ ruby -Itest test/cases/base_test.rb -n test_something_works
db045db @dhh Initial
dhh authored Nov 24, 2004
17
f9e3d4b @jonleighton Refactor Active Record test connection setup. Please see the RUNNING_…
jonleighton authored Jun 4, 2011
18 You can run with a database other than the default you set in test/config.yml, using the ARCONN
19 environment variable:
b451de0 @spastorino Deletes trailing whitespaces (over text files only find * -type f -ex…
spastorino authored Aug 14, 2010
20
fb1fd61 @jonleighton Add support for using an ARCONFIG environment variable to specify the…
jonleighton authored Jun 12, 2011
21 $ ARCONN=postgresql ruby -Itest test/cases/base_test.rb
96980bd @dhh Added change_table for migrations (Jeff Dean) [#71 state:resolved]
dhh authored May 3, 2008
22
f9e3d4b @jonleighton Refactor Active Record test connection setup. Please see the RUNNING_…
jonleighton authored Jun 4, 2011
23 You can run all the tests for a given database via rake:
784165e @dhh Fixed a few Oracle issues: Allows Oracle's odd date handling to still…
dhh authored Jul 5, 2006
24
fb1fd61 @jonleighton Add support for using an ARCONFIG environment variable to specify the…
jonleighton authored Jun 12, 2011
25 $ rake test_mysql
26
27 The 'rake test' task will run all the tests for mysql, mysql2, sqlite3 and postgresql.
28
29 == Identity Map
30
31 By default the tests run with the Identity Map turned off. But all tests should pass whether or
32 not the identity map is on or off. You can turn it on using the IM env variable:
33
34 $ IM=true ruby -Itest test/case/base_test.rb
35
36 == Config file
37
38 By default, the config file is expected to be at the path test/config.yml. You can specify a
39 custom location with the ARCONFIG environment variable.
Something went wrong with that request. Please try again.