aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/fixtures.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Ignore fixtures in test cases if there are no database configurations. ↵Jeremy Kemper2006-07-101-2/+2
| | | | | | References #5497. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4603 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4720@asus: jeremy | 2006-06-28 18:12:57 -0700Jeremy Kemper2006-06-291-2/+4
| | | | | | | Don't be such a hardass. References #5497. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4508 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't assume Active Record is available. Closes #5497.Jeremy Kemper2006-06-281-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4644@asus: jeremy | 2006-06-16 14:57:03 -0700Jeremy Kemper2006-06-191-2/+2
| | | | | | | | | | | | | | | | | | | | | locking r4645@asus: jeremy | 2006-06-17 12:41:30 -0700 missing reply fixture r4646@asus: jeremy | 2006-06-19 13:05:23 -0700 Use a per-thread (rather than global) transaction mutex so you may execute concurrent transactions on separate connections. r4647@asus: jeremy | 2006-06-19 13:07:23 -0700 PostgreSQL: introduce allow_concurrency option which determines whether to use blocking or asynchronous #execute. Adapters with blocking #execute will deadlock Ruby threads. The default value is ActiveRecord::Base.allow_concurrency. r4648@asus: jeremy | 2006-06-19 13:08:40 -0700 Pass the default allow_concurrency when instantiating new connections. r4649@asus: jeremy | 2006-06-19 13:11:12 -0700 Break out concurrent transaction tests and run them for PostgreSQLAdapter only (need to fork or system('some_test_script') for the other adapters) r4650@asus: jeremy | 2006-06-19 13:42:48 -0700 Row locking. Provide a locking clause with the :lock finder option or true for the default "FOR UPDATE". r4661@asus: jeremy | 2006-06-19 15:36:51 -0700 excise the junk mutex git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quell warnings. Closes #5245.Jeremy Kemper2006-06-011-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4392 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add support for FrontBase (http://www.frontbase.com/) with a new adapter ↵Marcel Molina2006-04-271-1/+7
| | | | | | thanks to the hard work of one Mike Laster. Closes #4093. [mlaster@metavillage.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix AR tests for sqliteRick Olson2006-03-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Catch FixtureClassNotFound when using instantiated fixtures on a fixture ↵Rick Olson2006-03-141-2/+4
| | | | | | that has no ActiveRecord model [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3866 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow set_fixture_class to take Classes instead of strings for a class in a ↵Rick Olson2006-03-061-2/+7
| | | | | | module. Raise FixtureClassNotFound if a fixture can't load. [Rick Olson] closes #4095 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3804 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Clear stale, cached connections left behind by defunct threads. Eliminate ↵Jeremy Kemper2006-03-011-1/+1
| | | | | | duplicate connection cache. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3729 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make rake load_fixtures work with the new, flexible, fixtures api. [Rick ↵Michael Koziarski2006-02-281-1/+1
| | | | | | Olson]. Closes #3995 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change Fixtures.create_fixtures arity to be backwards compatibleNicholas Seckar2006-02-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3694 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add set_fixture_class to allow the use of table name accessors with models ↵Nicholas Seckar2006-02-271-9/+16
| | | | | | which use set_default_name. Closes #3935 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Only load .yml files in sub-directoriesDavid Heinemeier Hansson2006-02-271-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that fixtures to placed in subdirectories of the main fixture files ↵David Heinemeier Hansson2006-02-271-1/+8
| | | | | | are also loaded (closes #3937) [dblack@wobblini.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3683 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* give helpful error messages when fixtures accessed style table_name(:name) ↵Tobias Lütke2006-01-251-1/+5
| | | | | | cannot be found [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3480 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Clear connection cache after rolling back transaction.Jeremy Kemper2005-12-051-2/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Connection cache to speed up retrieve_connection and get rid of dirty ↵Jeremy Kemper2005-12-041-0/+2
| | | | | | connection marking. References #428. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct fixture behavior when table name pluralization is off. Closes #2719.Jeremy Kemper2005-11-031-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3801@sedna: jeremy | 2005-10-28 00:42:28 -0700Jeremy Kemper2005-10-281-2/+2
| | | | | | | Use AR::Base silencing rather than AR::Base.logger silencing in fixtures to preserve Log4r compatibility. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2775 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix docs (closes #2491)David Heinemeier Hansson2005-10-261-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2736@asus: jeremy | 2005-10-24 17:08:12 -0700Jeremy Kemper2005-10-251-110/+78
| | | | | | | | | | | | | | | | | | | Test for eager associations with limits should not assume that records are ordered by id. r2737@asus: jeremy | 2005-10-24 19:06:09 -0700 Fail fast if invalid primary key column. r2746@asus: jeremy | 2005-10-25 15:37:28 -0700 Begin rollback of fixture delete order. Its solves a problem for 1% of users who already have a workaround while severely slowing down the other 99%. r2747@asus: jeremy | 2005-10-25 16:03:01 -0700 Rollback the rest. r2748@asus: jeremy | 2005-10-25 16:06:26 -0700 Re-add fixtures declaration to conditions scoping test r2749@asus: jeremy | 2005-10-25 16:09:03 -0700 Re-add fixtures declaration to finder test r2750@asus: jeremy | 2005-10-25 16:13:50 -0700 Don't assume keyboards table is empty git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2730 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2727@asus: jeremy | 2005-10-24 14:14:36 -0700Jeremy Kemper2005-10-241-9/+8
| | | | | | | Fallback to @loaded_fixtures = {}. Use Logger#silence. Test fixture isolation with use_instantiated_fixtures and with no fixtures declaration. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2718@asus: jeremy | 2005-10-23 14:45:30 -0700Jeremy Kemper2005-10-231-90/+115
| | | | | | | | | | | Ticket 2404 - fixture delete order r2719@asus: jeremy | 2005-10-23 15:01:13 -0700 Keep closer tabs on dirty, loaded, and declared fixtures. Closes #2404. r2720@asus: jeremy | 2005-10-23 16:09:19 -0700 ensure table names are strings. set dirty = dirty union loaded rather than dirty = loaded. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2714 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update/clean up ActiveRecord documentation (rdoc)Jamis Buck2005-10-161-4/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3616@asus: jeremy | 2005-09-26 23:09:28 -0700Jeremy Kemper2005-10-161-17/+7
| | | | | | | | | | | | | | | | | | | | | | | Ticket 2292 - Sequences, schemas, and fixtures r3917@asus: jeremy | 2005-10-15 10:43:24 -0700 fix pk assert r3918@asus: jeremy | 2005-10-15 10:46:52 -0700 rework query cache connection= override r3919@asus: jeremy | 2005-10-15 10:47:45 -0700 correct fixtures usage r3920@asus: jeremy | 2005-10-15 10:53:23 -0700 correct attr assignment r3921@asus: jeremy | 2005-10-15 12:59:10 -0700 sequences r3922@asus: jeremy | 2005-10-15 16:36:09 -0700 reset fixtures work with sequences r3951@asus: jeremy | 2005-10-15 23:23:12 -0700 cut down excess features r3952@asus: jeremy | 2005-10-15 23:40:30 -0700 don't test for PostgreSQL specifically git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2639 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Really fix #1896. YAML class structure changed between 1.8.2 and 1.8.3, ↵Jeremy Kemper2005-10-151-1/+1
| | | | | | breaking the original implementation. Duck-type instead of checking kind_of? git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2603 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Support ordered YAML fixtures. #1896Jeremy Kemper2005-10-151-3/+29
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2600 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3581@sedna: jeremy | 2005-10-13 12:20:42 -0700Jeremy Kemper2005-10-131-1/+7
| | | | | | | Preserve order of fixture declarations. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2560 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oops, swapped order of params to COALESCE! Upcoming patch has test cases.Jeremy Kemper2005-09-271-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2370 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3613@asus: jeremy | 2005-09-26 22:25:04 -0700Jeremy Kemper2005-09-271-2/+2
| | | | | | | Handle sequence reset for empty tables and models with custom primary keys. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2357 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3569@asus: jeremy | 2005-09-26 05:33:09 -0700Jeremy Kemper2005-09-261-6/+6
| | | | | | | | | | | Ticket 1749 - reset_sequences workaround for non-integer sequences r3570@asus: jeremy | 2005-09-26 08:30:30 -0700 Fixtures.reset_sequences should only reset sequences corresponding to integer primary keys named id. #1749 r3571@asus: jeremy | 2005-09-26 08:31:11 -0700 Update change log. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2343 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* An explicit include ClassInheritableAttributes is no longer needed #1948 ↵David Heinemeier Hansson2005-09-081-2/+0
| | | | | | [Caleb Tennis] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures ignore table name prefix and suffix #1987 [Jakob S]Jamis Buck2005-09-021-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2101 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Yaml error message in fixtures hid the real error #1623 [Nicholas ↵David Heinemeier Hansson2005-07-061-1/+1
| | | | | | Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated all references to the old find_first and find_all to use the new ↵David Heinemeier Hansson2005-06-261-3/+3
| | | | | | style #1511 [Marcel Molina] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document better #1057David Heinemeier Hansson2005-06-181-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1452 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Do not use instantiated fixtures (in general) in tests. Also, support the ↵Jamis Buck2005-06-101-2/+17
| | | | | | use of transactional fixtures by setting the AR_TX_FIXTURES environment variable to "yes". git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Using transactional fixtures now causes the data to be loaded only once, for ↵Jamis Buck2005-06-031-2/+8
| | | | | | BIG speed improvements git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added fixture accessors that can be used when fixture instantiation is ↵Jamis Buck2005-06-031-2/+28
| | | | | | disabled, "model_name(:fixture_name)" git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1383 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed PostgreSQL usage of fixtures with regards to public schemas and table ↵David Heinemeier Hansson2005-04-181-2/+2
| | | | | | names with dots #962 [gnuman1@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that fixtures were being deleted in the same order as inserts causing ↵David Heinemeier Hansson2005-04-181-7/+14
| | | | | | FK errors #890 [andrew.john.peters@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1205 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added quoting of column names for fixtures #997 [jcfischer@gmail.com]David Heinemeier Hansson2005-04-071-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made eager loading work even moreDavid Heinemeier Hansson2005-04-031-1/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1083 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added with additional settings for working with transactional fixtures and ↵David Heinemeier Hansson2005-03-201-15/+61
| | | | | | pre-loaded test databases #865 [mindel] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@924 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the possibility of specifying fixtures in multiple calls #816 ↵David Heinemeier Hansson2005-03-171-1/+1
| | | | | | [kim@tinker.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@915 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated wording in YAML error [noradio]David Heinemeier Hansson2005-03-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added transactional fixtures that uses rollback to undo changes to fixtures ↵David Heinemeier Hansson2005-03-061-28/+107
| | | | | | instead of DELETE/INSERT -- it's much faster. See documentation under Fixtures #760 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@846 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Better yaml fixture error #759 [xal]David Heinemeier Hansson2005-03-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@845 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed rails_generator to be usable without RubyGems #686 [Cristi BALAN]. ↵David Heinemeier Hansson2005-03-061-2/+0
| | | | | | Moved all active support dependencies into active support git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de