aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2006-01-20 20:43:40 +0000
committerJamis Buck <jamis@37signals.com>2006-01-20 20:43:40 +0000
commitd2f47503f8890fe42310ada8ca9408ac5f268265 (patch)
treed1c7285079d79789fee8dc8edd4d9f860078f4b4 /activerecord/test
parente3898491f2960890d866bfe08e221a4cb52cfccc (diff)
downloadrails-d2f47503f8890fe42310ada8ca9408ac5f268265.tar.gz
rails-d2f47503f8890fe42310ada8ca9408ac5f268265.tar.bz2
rails-d2f47503f8890fe42310ada8ca9408ac5f268265.zip
Add AR::Base.base_class for querying the ancestor AR::Base subclass [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3439 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-xactiverecord/test/base_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb
index 5c70768436..42fefa9001 100755
--- a/activerecord/test/base_test.rb
+++ b/activerecord/test/base_test.rb
@@ -1112,7 +1112,12 @@ class BasicsTest < Test::Unit::TestCase
developers = Developer.find(:all, :order => 'id')
assert_equal Developer.count, developers.size
end
-
+
+ def test_base_class
+ assert_equal LoosePerson, LoosePerson.base_class
+ assert_equal LoosePerson, LooseDescendant.base_class
+ end
+
# FIXME: this test ought to run, but it needs to run sandboxed so that it
# doesn't b0rk the current test environment by undefing everything.
#