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
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
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
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
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
David Heinemeier Hansson
631181ca18
Renamed the "oci" adapter to "oracle", but kept the old name as an alias ( closes #4017 ) [schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 16:01:53 +00:00
David Heinemeier Hansson
6417cdd846
Fixed tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3708 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-28 20:39:21 +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
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
Marcel Molina
bbec3ae512
Sanitize scoped conditions.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3379 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-04 03:43:28 +00:00
Jeremy Kemper
2076dca63f
r3095@asus: jeremy | 2005-11-15 22:40:51 -0800
...
Ticket #1874 - Firebird adapter
r3107@asus: jeremy | 2005-11-16 00:06:14 -0800
quote column aliases
r3108@asus: jeremy | 2005-11-16 00:08:12 -0800
quote columns in construct_conditions_from_arguments. update sequence_name docs. introduce prefetched primary keys.
r3109@asus: jeremy | 2005-11-16 00:09:08 -0800
double-quote rather than single-quote sqlite columns
r3110@asus: jeremy | 2005-11-16 00:09:56 -0800
quote column names and use attribute_condition in validates_uniqueness_of
r3111@asus: jeremy | 2005-11-16 00:12:24 -0800
Use QUOTED_TYPE constant in tests
r3112@asus: jeremy | 2005-11-16 00:13:28 -0800
restrict test_inserts_with_pre_and_suffix to those adapters which support migrations
r3113@asus: jeremy | 2005-11-16 00:14:09 -0800
Use QUOTED_TYPE constant in tests
r3114@asus: jeremy | 2005-11-16 00:14:30 -0800
Use QUOTED_TYPE constant in tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-16 08:16:54 +00:00
Jeremy Kemper
7c8f3edc99
r4325@asus: jeremy | 2005-11-12 03:57:46 -0800
...
PostgreSQL: correctly discover custom primary key sequences. PostgreSQL: smarter sequence name defaults, stricter last_insert_id, warn on pk without sequence. Base.reset_sequence_name analogous to reset_table_name (mostly useful for testing). Base.define_attr_method allows nil values. References #2594 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2985 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-12 11:59:54 +00:00
David Heinemeier Hansson
68160b3485
Added migration support for Oracle ( closes #2647 ) [Michael Schoen]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-29 18:40:49 +00:00
David Heinemeier Hansson
beff664f2a
Refactor DB exceptions and deal more with DB2 ( closes #2624 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-27 08:18:41 +00:00
David Heinemeier Hansson
dd257a3ccb
Fixed handling of nil number columns on Oracle and cleaned up tests for Oracle in general #2555 [schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2741 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-26 12:57:11 +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
Jeremy Kemper
328ef3feaa
Parenthesize :conditions
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-18 23:52:07 +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
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
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
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
Jamis Buck
6d9ee4a306
Added fixture accessors that can be used when fixture instantiation is disabled, "model_name(:fixture_name)"
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1383 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-03 11:49:34 +00:00
David Heinemeier Hansson
03097d3a60
Fixed that fixtures were being deleted in the same order as inserts causing FK errors #890 [andrew.john.peters@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1205 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-18 07:52:58 +00:00
David Heinemeier Hansson
7ad57c4f02
Added quoting of column names for fixtures #997 [jcfischer@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-07 06:54:25 +00:00
David Heinemeier Hansson
b2cfbc4cc9
Added with additional settings for working with transactional fixtures and pre-loaded test databases #865 [mindel]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@924 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-20 13:42:35 +00:00
David Heinemeier Hansson
060b9b16aa
Added the possibility of specifying fixtures in multiple calls #816 [kim@tinker.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@915 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-17 19:36:44 +00:00
David Heinemeier Hansson
903ef71b99
Added transactional fixtures that uses rollback to undo changes to fixtures 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
2005-03-06 13:51:55 +00:00
David Heinemeier Hansson
95314be65b
Added tree mixin and unit tests for all the mixins
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 00:46:26 +00:00
David Heinemeier Hansson
c7589559de
Tidied up Fixtures for better readability and some error checking [bitsweat]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@100 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-09 15:52:54 +00:00
David Heinemeier Hansson
79e85edd71
Added reverse order of deleting fixtures, so referential keys can be maintained #247 [Tim Bates]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@38 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 12:25:04 +00:00
David Heinemeier Hansson
db045dbbf6
Initial
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-24 01:04:44 +00:00