Jeremy Kemper
49d1f6a813
Fixtures: fix YAML ordered map support. Closes #2665 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-09 02:06:50 +00:00
David Heinemeier Hansson
23e24c5996
Setting fixtures automatically for integration tests is a bit harder -- will 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
2007-02-25 19:27:56 +00:00
David Heinemeier Hansson
87b7b5b3e7
Added fixtures :all to test_helper.rb to assume that most people just want 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
2007-02-25 17:31:43 +00:00
Jeremy Kemper
0eb8398cfa
Fixtures use the table name and connection from set_fixture_class. Closes #7330 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6023 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-24 01:29:49 +00:00
Michael Koziarski
a2e826dc0f
Change fixture_path to a class inheritable accessor allowing test cases to 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
2006-11-21 22:28:24 +00:00
Jeremy Kemper
1117387376
Compare to 0 rather than call zero? to handle nil.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5282 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-11 00:29:59 +00:00
Jeremy Kemper
2c3ca4c4e6
Don't rollback in teardown unless a transaction was started. Don't start a 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
2006-10-09 07:48:27 +00:00
Jeremy Kemper
5589c734a8
Improve yaml fixtures error reporting. Closes #6205 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5104 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-13 23:31:54 +00:00
Jeremy Kemper
842ce34bbc
Fixtures: correct escaping of \n and \r. Closes #5859 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-24 01:50:24 +00:00
Nicholas Seckar
33406747d8
Use require_dependency and not require to load models
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4753 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-12 19:29:46 +00:00
Rick Olson
02021d89b1
Tweak fixtures so they don't try to use a non-ActiveRecord class. [Kevin Clark]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-11 23:38:46 +00:00
Jeremy Kemper
f0c22d4ad5
occured -> occurred. Closes #5559 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4604 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-10 19:41:59 +00:00
Jeremy Kemper
a72ace1596
Ignore fixtures in test cases if there are no database configurations. References #5497 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4603 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-10 19:31:44 +00:00
Jeremy Kemper
5b866f75a7
r4720@asus: jeremy | 2006-06-28 18:12:57 -0700
...
Don't be such a hardass. References #5497 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4508 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-29 01:13:55 +00:00
Jeremy Kemper
ce458a74a5
Don't assume Active Record is available. Closes #5497 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-28 23:51:50 +00:00
Jeremy Kemper
15aa6e0552
r4644@asus: jeremy | 2006-06-16 14:57:03 -0700
...
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
2006-06-19 22:48:51 +00:00
Jeremy Kemper
97f4a5aa14
Quell warnings. Closes #5245 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4392 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-01 02:02:42 +00:00
Marcel Molina
b2c0ddf033
Add support for FrontBase ( http://www.frontbase.com/ ) with a new adapter 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
2006-04-27 22:39:45 +00:00
Rick Olson
fd87a78710
fix AR tests for sqlite
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-16 05:21:40 +00:00
Rick Olson
4965a754d5
Catch FixtureClassNotFound when using instantiated fixtures on a fixture that has no ActiveRecord model [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3866 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-14 15:15:06 +00:00
Rick Olson
2383a60443
Allow set_fixture_class to take Classes instead of strings for a class in a 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
2006-03-06 23:03:35 +00:00
Jeremy Kemper
7568f18a2a
Clear stale, cached connections left behind by defunct threads. Eliminate duplicate connection cache.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3729 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 22:05:41 +00:00
Michael Koziarski
17ff70ac84
Make rake load_fixtures work with the new, flexible, fixtures api. [Rick Olson]. Closes #3995
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-28 20:18:02 +00:00
Nicholas Seckar
1383d1c3b9
Change Fixtures.create_fixtures arity to be backwards compatible
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3694 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-28 00:40:33 +00:00
Nicholas Seckar
ada11d6313
Add set_fixture_class to allow the use of table name accessors with models which use set_default_name. Closes #3935
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 20:29:28 +00:00
David Heinemeier Hansson
018e7f24f0
Only load .yml files in sub-directories
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 05:26:42 +00:00
David Heinemeier Hansson
91247b6167
Added that fixtures to placed in subdirectories of the main fixture files are also loaded ( closes #3937 ) [dblack@wobblini.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3683 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 05:14:57 +00:00
Tobias Lütke
2dc16df10c
give helpful error messages when fixtures accessed style table_name(:name) cannot be found [Tobias Luetke]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3480 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-25 02:40:25 +00:00
Jeremy Kemper
b13573ed37
Clear connection cache after rolling back transaction.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-05 19:58:11 +00:00
Jeremy Kemper
dc64887f21
Connection cache to speed up retrieve_connection and get rid of dirty connection marking. References #428 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-04 05:56:49 +00:00
Jeremy Kemper
e024f2f1bf
Correct fixture behavior when table name pluralization is off. Closes #2719 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-03 15:43:48 +00:00
Jeremy Kemper
fb61912798
r3801@sedna: jeremy | 2005-10-28 00:42:28 -0700
...
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
2005-10-28 04:53:35 +00:00
David Heinemeier Hansson
a8eea0b04b
Fix docs ( closes #2491 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-26 13:05:48 +00:00
Jeremy Kemper
17d3fd3165
r2736@asus: jeremy | 2005-10-24 17:08:12 -0700
...
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
2005-10-25 18:14:09 +00:00
Jeremy Kemper
f57ba4cc52
r2727@asus: jeremy | 2005-10-24 14:14:36 -0700
...
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
2005-10-24 16:45:33 +00:00
Jeremy Kemper
a2f0ae76d1
r2718@asus: jeremy | 2005-10-23 14:45:30 -0700
...
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
2005-10-23 19:02:38 +00:00
Jamis Buck
bcd0968a6f
Update/clean up ActiveRecord documentation (rdoc)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-16 16:00:16 +00:00
Jeremy Kemper
7117fdb8ce
r3616@asus: jeremy | 2005-09-26 23:09:28 -0700
...
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
2005-10-16 03:45:39 +00:00
Jeremy Kemper
00a194d739
Really fix #1896 . YAML class structure changed between 1.8.2 and 1.8.3, 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
2005-10-15 02:49:22 +00:00
Jeremy Kemper
da675e536d
Support ordered YAML fixtures. #1896
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2600 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-15 02:01:38 +00:00
Jeremy Kemper
88c3416ffd
r3581@sedna: jeremy | 2005-10-13 12:20:42 -0700
...
Preserve order of fixture declarations.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2560 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-13 19:06:15 +00:00
Jeremy Kemper
3fa38c4dba
Oops, swapped order of params to COALESCE! Upcoming patch has test cases.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2370 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-27 20:24:52 +00:00
Jeremy Kemper
f5f7beb369
r3613@asus: jeremy | 2005-09-26 22:25:04 -0700
...
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
2005-09-27 01:51:05 +00:00
Jeremy Kemper
a68557952f
r3569@asus: jeremy | 2005-09-26 05:33:09 -0700
...
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
2005-09-26 11:56:16 +00:00
David Heinemeier Hansson
febc24dee7
An explicit include ClassInheritableAttributes is no longer needed #1948 [Caleb Tennis]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-08 16:28:10 +00:00
Jamis Buck
e3d34286e3
Fixtures ignore table name prefix and suffix #1987 [Jakob S]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2101 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-02 10:51:23 +00:00
David Heinemeier Hansson
169eb781f1
Fixed that Yaml error message in fixtures hid the real error #1623 [Nicholas Seckar]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-06 10:16:38 +00:00
David Heinemeier Hansson
3dfa56ccfb
Updated all references to the old find_first and find_all to use the new style #1511 [Marcel Molina]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-26 11:25:32 +00:00
David Heinemeier Hansson
4f00d181d5
Document better #1057
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1452 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-18 05:18:59 +00:00
Jamis Buck
2c0fa32088
Do not use instantiated fixtures (in general) in tests. Also, support the 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
2005-06-10 14:58:02 +00:00