Sha256: 963fd8c62313f27674c437df6a86e6838182fe590da63bbafb5a92db932b56c0

Contents?: true

Size: 1.53 KB

Versions: 29

Compression:

Stored size: 1.53 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 database connection settings in test/connections/databases.yml.
  Look at databases.example.yml for examples.

    mysql:
      adapter: mysql
      username: root
      database: composite_primary_keys_unittest

* rake -T mysql

    rake mysql:build_database         # Build the MySQL test databases
    rake mysql:drop_database          # Drop the MySQL test databases
    rake mysql:rebuild_database       # Rebuild the MySQL test databases
    rake mysql:test                    # Run tests using the mysql adapter

* rake mysql:build_database
* 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

== Logging

By default, ActiveRecord's log messages are sent to standard out when
running the tests. If you would prefer to send them to a file, specify
it as the environment variable CPK_LOGFILE:

* CPK_LOGFILE=cpk_test.log rake mysql:test

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
composite_primary_keys-13.0.1 test/README_tests.rdoc
composite_primary_keys-13.0.0 test/README_tests.rdoc
composite_primary_keys-12.0.10 test/README_tests.rdoc
composite_primary_keys-12.0.9 test/README_tests.rdoc
composite_primary_keys-12.0.8 test/README_tests.rdoc
composite_primary_keys-12.0.6 test/README_tests.rdoc
composite_primary_keys-12.0.5 test/README_tests.rdoc
composite_primary_keys-12.0.4 test/README_tests.rdoc
composite_primary_keys-12.0.3 test/README_tests.rdoc
composite_primary_keys-12.0.2 test/README_tests.rdoc
composite_primary_keys-11.3.1 test/README_tests.rdoc
composite_primary_keys-8.1.8 test/README_tests.rdoc
composite_primary_keys-12.0.1 test/README_tests.rdoc
composite_primary_keys-12.0.0 test/README_tests.rdoc
composite_primary_keys-12.0.0.rc5 test/README_tests.rdoc
composite_primary_keys-12.0.0.rc4 test/README_tests.rdoc
composite_primary_keys-12.0.0.rc3 test/README_tests.rdoc
composite_primary_keys-12.0.0.rc2 test/README_tests.rdoc
composite_primary_keys-12.0.0.rc1 test/README_tests.rdoc
composite_primary_keys-8.1.7 test/README_tests.rdoc