composite-primary-keys/composite_primary_keys — pull request #210 by codeodor (2014-06-09 14:09:51+00:00)
Title: Fix several issues with the tests

Some tests were failing in certain circumstances:

1. If `TestCallbacks` is run before other tests that use the `Suburb` model,
the callbacks are defined but the `@@callbacks` variable they reference
is not defined.
2. A reference to `scoped` method which no longer exists in ActiveRecord 4.1.
3. For MySQL, the timestamp column is not precise enough to reliably sleep
for 0.1 second and expect the time to change, so we increase that sleep to
1.0 second.
4. For MySQL, the default for the PK columns in the `capitols` table come as
an empty string, which results in CPK thinking
`Capitol.new == Captiol.new`

As a bonus, this PR also removes some code which never gets run on Rails 4.1.