aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/fixtures.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fixtures: fix YAML ordered map support. Closes #2665.Jeremy Kemper2007-03-091-6/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Setting fixtures automatically for integration tests is a bit harder -- will ↵David Heinemeier Hansson2007-02-251-0/+2
| | | | | | have to wait until the test superclass reform is implemented git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added fixtures :all to test_helper.rb to assume that most people just want ↵David Heinemeier Hansson2007-02-251-3/+12
| | | | | | all their fixtures loaded all the time [DHH] Added fixtures :all as a way of loading all fixtures in the fixture directory at once (closes #7214) [manfred] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures use the table name and connection from set_fixture_class. Closes #7330.Jeremy Kemper2007-01-241-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6023 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change fixture_path to a class inheritable accessor allowing test cases to ↵Michael Koziarski2006-11-211-1/+1
| | | | | | have their own custom set of fixtures. Closes #6672 [zdennis] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5604 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Compare to 0 rather than call zero? to handle nil.Jeremy Kemper2006-10-111-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5282 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't rollback in teardown unless a transaction was started. Don't start a ↵Jeremy Kemper2006-10-091-4/+4
| | | | | | transaction in create_fixtures if a transaction is started. Closes #6282. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve yaml fixtures error reporting. Closes #6205.Jeremy Kemper2006-09-131-13/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5104 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures: correct escaping of \n and \r. Closes #5859.Jeremy Kemper2006-08-241-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use require_dependency and not require to load modelsNicholas Seckar2006-08-121-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4753 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Tweak fixtures so they don't try to use a non-ActiveRecord class. [Kevin Clark]Rick Olson2006-08-111-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* occured -> occurred. Closes #5559.Jeremy Kemper2006-07-101-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4604 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* 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