aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/multiple_db_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Closes rails/rails#18864: Renaming transactional fixtures to transactional testsBrandon Weiss2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I’m renaming all instances of `use_transcational_fixtures` to `use_transactional_tests` and “transactional fixtures” to “transactional tests”. I’m deprecating `use_transactional_fixtures=`. So anyone who is explicitly setting this will get a warning telling them to use `use_transactional_tests=` instead. I’m maintaining backwards compatibility—both forms will work. `use_transactional_tests` will check to see if `use_transactional_fixtures` is set and use that, otherwise it will use itself. But because `use_transactional_tests` is a class attribute (created with `class_attribute`) this requires a little bit of hoop jumping. The writer method that `class_attribute` generates defines a new reader method that return the value being set. Which means we can’t set the default of `true` using `use_transactional_tests=` as was done previously because that won’t take into account anyone using `use_transactional_fixtures`. Instead I defined the reader method manually and it checks `use_transactional_fixtures`. If it was set then it should be used, otherwise it should return the default, which is `true`. If someone uses `use_transactional_tests=` then it will overwrite the backwards-compatible method with whatever they set.
* Do not run remove_connection in memory db testRafael Mendonça França2015-02-051-7/+7
| | | | This will make rake test_sqlite3_mem work again
* Fix count on a separate connection (fixes #18359)brainopia2015-01-081-0/+7
| | | | | | | | Previosly count and other AR calculations would convert column_name_for_operation to sql on a default Arel::Table.engine (AR::Base) connection. That could lead to trouble if current model has a connection to a different adapter or Base connection is inaccessible.
* Deprecate use of string in establish_connection as connection lookupJosé Valim2013-12-241-1/+1
|
* Remove ActiveRecord::ModelJon Leighton2012-10-261-2/+2
| | | | | | | | | | In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced.
* Use method compilation for association methodsJon Leighton2012-08-101-3/+1
| | | | | | | | | Method compilation provides better performance and I think the code comes out cleaner as well. A knock on effect is that methods that get redefined produce warnings. I think this is a good thing. I had to deal with a bunch of warnings coming from our tests, though.
* Fix GH #5399. connection_pools's keys are ↵kennyj2012-03-141-1/+7
| | | | ActiveRecord::Base::ConnectionSpecification objects.
* Fix rake test_sqlite3_memJon Leighton2012-03-041-7/+9
|
* added test for #3732Rick Martinez2012-02-101-0/+12
|
* pools are 1:1 with spec now rather than 1:1 with classAaron Patterson2011-11-281-1/+0
|
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* Rename active_relation_engine -> arel_engine and active_relation_table -> ↵Pratik Naik2010-01-161-2/+2
| | | | arel_table
* Ensure using proper engine for Arel::TablePratik Naik2010-01-041-0/+6
|
* Move the transaction counter to the connection object rather than ↵Jonathan Viney2008-07-151-0/+25
| | | | | | | maintaining it on the current Thread. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#533 state:resolved]
* Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ↵Joshua Peek2008-06-031-1/+1
| | | | ActiveSupport [#238 state:resolved]
* Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/railsJeremy Kemper2008-01-211-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix pathsJeremy Kemper2008-01-181-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move tests to casesJeremy Kemper2008-01-181-0/+60
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de