Vishnu Atrai
ed8fc19c6a
fix build 5001, model reply is required in cases/primary_keys_test too!
2012-02-12 14:02:24 +05:30
Karunakar (Ruby)
7381596ea3
removed unuseful require for reply as we are not using require model
2012-02-11 18:54:20 +05:30
kennyj
1a1d9e687a
Fix GH #4754 . Remove double-quote when using ANSI_QUOTES
2012-01-31 02:13:12 +09:00
Jon Leighton
f06074f365
Fix CI
2011-12-28 23:08:40 +00:00
Jon Leighton
0b08ff7d92
Cache columns at the model level.
...
Allows two models to use the same table but have different primary keys.
2011-12-16 13:52:07 +00:00
Jon Leighton
8dba32f125
Fix #3987 .
2011-12-15 13:23:28 +00:00
Jon Leighton
e9fb6d04bd
Add test for read_attribute(:id) with non-standard PK.
...
Also make it actually work.
It slows down all read_attribute accesses to map 'id' to whatever the PK
actually is, inside read_attribute. So instead make sure the necessary
methods are defined and that they redirect wherever they need to go.
2011-12-01 23:41:51 +00:00
Jon Leighton
1a474cc8e4
Deprecate set_primary_key in favour of self.primary_key=
2011-11-29 20:13:37 +00:00
Jeremy Kemper
999b7ed94d
Transactional fixtures enlist all active database connections.
...
You can use multiple databases in your tests without disabling transactional fixtures.
2011-10-05 19:10:18 -07:00
Jon Leighton
64747654ca
Revert "Raise error on unknown primary key."
...
This reverts commit ee2be435b1
.
2011-10-05 20:21:21 +01:00
Jon Leighton
ee2be435b1
Raise error on unknown primary key.
...
If we don't have a primary key when we ask for it, it's better to fail
fast. Fixes GH #2307 .
2011-10-05 01:11:40 +01:00
Jon Leighton
b3407c86cf
Don't require a DB connection when setting primary key.
...
Closes #2807 .
2011-09-26 18:15:09 +01:00
Santiago Pastorino
1b676fc760
Revert "to_key on a destroyed model should return nil". Closes #2440
...
This reverts commit c5448721b5
.
2011-08-05 19:39:19 -03:00
Santiago Pastorino
c5448721b5
to_key on a destroyed model should return nil
2011-07-09 15:36:57 -03:00
Aaron Patterson
61774e0d49
please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT
2011-06-06 15:47:13 -07:00
Jon Leighton
253bb6b926
Refactor Active Record test connection setup. Please see the 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.
2011-06-04 23:47:03 +01:00
Andrew White
555d016389
Quote find_in_batches ORDER BY clause [ #6620 state:resolved]
2011-03-29 17:24:55 +01:00
Xavier Noria
fb6b805620
code gardening: we have assert_(nil|blank|present), more concise, with better default failure messages - let's use them
2010-08-17 03:32:11 +02:00
Santiago Pastorino
3c8b50020a
Revert "Makes AR use AMo to_key implementation"
...
This reverts commit 36a84a4f15
.
2010-08-15 11:33:21 -03:00
Santiago Pastorino
1590377886
Makes AR use AMo to_key implementation
...
[#5249 ]
2010-08-13 22:26:44 -03:00
Neeraj Singh
0fce4ae57f
expected value should come first in assert_equal
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-18 15:13:38 +02:00
Neeraj Singh
6caf943ace
primary_keys_test reads better than pk_test
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-18 15:13:29 +02:00