Jenner LaFave
5de7309b7b
Add support for module-level table_suffix in models
...
This makes table_name_suffix work the same as table_name_prefix when
using namespaced models. Pretty much the same as 67d1cec
.
2014-05-05 12:41:26 -07:00
Guo Xiang Tan
3baace687c
Use teardown helper method.
...
Follow-Up to https://github.com/rails/rails/pull/14348
Ensure that SQLCounter.clear_log is called after each test.
This is a step to prevent side effects when running tests. This will allow us to run them in random order.
2014-03-14 20:48:59 -07:00
Aaron Patterson
da06ae88ab
add missing require
2013-10-02 17:04:02 -07:00
Jon Leighton
b658cf1198
Deprecate ActiveRecord::Base.scoped.
...
It doesn't serve much purpose now that ActiveRecord::Base.all returns a
Relation.
The code is moved to active_record_deprecated_finders.
2012-07-27 17:27:47 +01:00
Jon Leighton
3981a687f9
remove deprecated calls
2012-04-27 14:28:36 +01:00
Jon Leighton
df6f971e3a
%s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other things
2012-04-27 11:42:50 +01:00
Jon Leighton
75f03eca75
remove calls to find(:first), find(:last) and find(:all)
2012-04-26 18:32:55 +01:00
Jon Leighton
1ad138cf4b
fix tests
2012-04-13 18:26:19 +01:00
Jon Leighton
a2dab46cae
Deprecate inferred JOINs with includes + SQL snippets.
...
See the CHANGELOG for details.
Fixes #950 .
2012-01-16 21:32:12 +00:00
Jon Leighton
d13627d532
Revert "Deprecate implicit eager loading. Closes #950."
...
This reverts commit c99d507fcc
.
2012-01-16 21:17:17 +00:00
Jon Leighton
c99d507fcc
Deprecate implicit eager loading. Closes #950 .
2011-12-29 14:27:33 +00: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
Aaron Patterson
839f3bf682
just use a hash for doing association caching
2011-01-07 11:28:11 -08:00
Santiago Pastorino
b451de0d6d
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 04:12:33 -03:00
Neeraj Singh
ce20b93606
assert_equal should be used instead of assert
...
[#4629 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-18 16:13:00 +02:00
Andrew White
9cea9bc7f0
Refactor compute_type to handle situations where the correct class is already loaded
...
Signed-off-by: wycats <wycats@gmail.com>
2010-04-12 21:31:20 -07:00
Andrew White
67d1cec4c8
Add the ability to specify table_name_prefix on individual modules
...
Signed-off-by: wycats <wycats@gmail.com>
2010-03-28 23:43:28 -07:00
David Heinemeier Hansson
1459c8cc1d
Changed ActiveRecord::Base.store_full_sti_class to be true by default reflecting the previously announced Rails 3 default [DHH]
2010-01-03 19:30:28 -08:00
Dmitry Ratnikov
314ba0433f
Changed to use klass instead of constantizing in assign_ids generated method
...
[#260 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 02:52:06 -07:00
Dmitry Ratnikov
f16008afdd
Modified Rich Bradley's test-case to fail as part of suite and with a reasonable message
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 02:40:27 -07:00
Rich Bradley
9bb8ef9ede
Fix for nested :include with namespaced models.
...
[#260 state:committed]
2009-08-09 00:31:46 -07:00
Josh Peek
4b68982f64
Improve ActiveRecord::Base#table_name unit tests for nested classes. Closes #10289 . [scott_willson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-07 19:44:37 +00:00
Jeremy Kemper
39814fcce0
Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 17:20:51 +00:00
Jeremy Kemper
1e70928014
Fix paths
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:31:37 +00:00
Jeremy Kemper
42b39ae3f2
Move tests to cases
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:30:42 +00:00