resolver tests fail if mysql adapter not installed #6616

Merged
merged 1 commit into from Jun 5, 2012

Conversation

Projects
None yet
2 participants

dpassage commented Jun 4, 2012

The resolver tests fail if the mysql gem is not installed; this breaks
being able to run the sqlite3 tests without that gem.

To reproduce:

bundle install --without db
cd active record
bundle exec rake test_sqlite3

This fix ensures the tests will only run if the mysql gem is installed.

A better solution might be to move these tests into the per-adapter tests,
and test each adapter's resolver.

David Paschich The resolver tests fail if the mysql gem is not installed; this breaks
being able to run the sqlite3 tests without that gem. This fix ensures
the tests will only run if the mysql gem is installed.

A better solution might be to move these tests into the per-adapter tests,
and test each adapter's resolver.
a36bda8

dpassage commented Jun 4, 2012

I thought of that. I didn't because it's not quite the right condition; the test can pass if mysql is installed and not the current adapter. The tests you mention above only apply if mysql is the current adapter because they interact directly with the database.

But I can change it if that's the right thing to do.

Fair enough, I'm gonna merge, thanks.

@carlosantoniodasilva carlosantoniodasilva added a commit that referenced this pull request Jun 5, 2012

@carlosantoniodasilva carlosantoniodasilva Merge pull request #6616 from dpassage/fix_resolver_test_sqlite3
Resolver tests fail if mysql adapter not installed
8359a2f

@carlosantoniodasilva carlosantoniodasilva merged commit 8359a2f into rails:master Jun 5, 2012

@carlosantoniodasilva carlosantoniodasilva added a commit that referenced this pull request Jul 20, 2012

@carlosantoniodasilva carlosantoniodasilva Merge pull request #6616 from dpassage/fix_resolver_test_sqlite3
Resolver tests fail if mysql adapter not installed
b16e7ed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment