Sha256: 4667888eb35e0baddb2650e4f0e72dd7b00b122c817d771c07ecbde22fa63f30

Contents?: true

Size: 1.3 KB

Versions: 3

Compression:

Stored size: 1.3 KB

Contents

= Composite Primary Keys - Testing Readme

== Testing an adapter

There are tests available for the following adapters:

* ibmdb
* mysql
* oracle
* oracle_enhanced
* postgresql
* sqlite3

To run the tests for one of the adapters follow these steps (using mysql in the example):

* You will need the following gems:
    - rake
    - activerecord (3.1.0.rc5 or later)
    - mysql (or the adapter of your choice)

* Put your mysql connection settings to test/connections/databases.yml
  look into databases.example.sql for reference,
  keep only one connection spec at once in databases.yml

    mysql:
      adapter: mysql
      username: root
      database: composite_primary_keys_unittest

* rake -T mysql

    rake mysql:build_databases         # Build the MySQL test databases
    rake mysql:drop_databases          # Drop the MySQL test databases
    rake mysql:rebuild_databases       # Rebuild the MySQL test databases
    rake mysql:test                    # Run tests using the mysql adapter

* rake mysql:build_databases
* rake mysql:test

== Running tests individually

You can specify which test you'd like to run on the command line:

* rake mysql:test TEST=test/test_equal.rb

If you want to run closer to the metal you can cd into the test/
directory and run the tests like so:

* ADAPTER=mysql ruby test_equal.rb

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
composite_primary_keys-4.0.0 test/README_tests.txt
composite_primary_keys-4.0.0.beta9 test/README_tests.txt
composite_primary_keys-4.0.0.beta8 test/README_tests.txt