1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

7 commits

Author SHA1 Message Date
Grace Liu
148c50b49a fixed support for DATABASE_URL for rake db tasks
- added tests to confirm establish_connection uses DATABASE_URL and
  Rails.env correctly even when no arguments are passed in.
- updated rake db tasks to support DATABASE_URL, and added tests to
  confirm correct behavior for these rake tasks.  (Removed
  establish_connection call from some tasks since in those cases
  the :environment task already made sure the function would be called)
- updated Resolver so that when it resolves the database url, it
  removes hash values with empty strings from the config spec (e.g.
  to support connection to postgresql when no username is specified).
2012-09-11 20:40:13 -07:00
David Paschich
a36bda8770 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.
2012-06-03 17:24:17 -07:00
Jon Leighton
dae7b65453 Support establishing connection on ActiveRecord::Model.
This is the 'top level' connection, inherited by any models that include
ActiveRecord::Model or inherit from ActiveRecord::Base.
2011-12-28 18:27:41 +00:00
Jon Leighton
6af7192af5 I herd you like modules. 2011-12-24 11:08:15 +00:00
Aaron Patterson
f73f53455a respond_to? information of AR is not the responsibility of the spec
resolver.
2011-11-29 11:48:55 -08:00
Jon Leighton
d534c8fbe2 Fix resolver_test.rb on travis (postgresql isn't setup, so it can't load the connection adapter) 2011-11-29 12:47:54 +00:00
Aaron Patterson
dde2113867 Move connection resoluion logic to it's own testable class. 2011-11-28 15:23:25 -08:00