Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7902

Show
Ignore:
Timestamp:
10/15/07 06:48:16 (1 year ago)
Author:
nzkoz
Message:

Update the instructions for running tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/RUNNING_UNIT_TESTS

    r5228 r7902  
    2424 
    2525Unit tests are located in test directory. If you only want to run a single test suite,  
    26 or don't want to bother with Rake, you can do so with something like
     26you can do so with
    2727 
    28    cd test; ruby -I "connections/native_mysql" base_test.rb 
     28   rake test_mysql TEST=base_test.rb 
    2929    
    30 That'll run the base suite using the MySQL-Ruby adapter. Change the adapter 
    31 and test suite name as needed. 
    32  
    33 You can also run all the suites on a specific adapter with: 
    34  
    35    cd test; all.sh "connections/native_mysql" 
     30That'll run the base suite using the MySQL-Ruby adapter. 
    3631 
    3732== Faster tests 
     
    4742  AR_TX_FIXTURES=yes ruby -I connections/native_sqlite3 base_test.rb 
    4843 
    49 == Testing with Oracle 
    5044 
    51 In order to allow for testing against Oracle using an "arunit" schema within an existing 
    52 Oracle database, the database name and tns connection string must be set in environment 
    53 variables prior to running the unit tests. 
    54  
    55   $ export ARUNIT_DB_NAME=MYDB 
    56   $ export ARUNIT_DB=MYDB 
    57  
    58 The ARUNIT_DB_NAME variable should be set to the name by which the database knows 
    59 itself, ie., what will be returned by the query: 
    60  
    61   select sys_context('userenv','db_name') db from dual 
    62  
    63 And the ARUNIT_DB variable should be set to the tns connection string. 
    64