diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-10-26 15:51:02 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-10-26 15:51:02 +0100 |
commit | 9e4c41c903e8e58721f2c41776a8c60ddba7a0a9 (patch) | |
tree | d580824995d5ea4866b1d976818f3e3d03a02e53 /activerecord/test/cases/inheritance_test.rb | |
parent | a27b5178d9f1011545ecbf94008c5d890bab25d0 (diff) | |
download | rails-9e4c41c903e8e58721f2c41776a8c60ddba7a0a9.tar.gz rails-9e4c41c903e8e58721f2c41776a8c60ddba7a0a9.tar.bz2 rails-9e4c41c903e8e58721f2c41776a8c60ddba7a0a9.zip |
Remove ActiveRecord::Model
In the end I think the pain of implementing this seamlessly was not
worth the gain provided.
The intention was that it would allow plain ruby objects that might not
live in your main application to be subclassed and have persistence
mixed in. But I've decided that the benefit of doing that is not worth
the amount of complexity that the implementation introduced.
Diffstat (limited to 'activerecord/test/cases/inheritance_test.rb')
-rw-r--r-- | activerecord/test/cases/inheritance_test.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb index 8fded9159f..aab7aa51dd 100644 --- a/activerecord/test/cases/inheritance_test.rb +++ b/activerecord/test/cases/inheritance_test.rb @@ -4,7 +4,6 @@ require 'models/person' require 'models/post' require 'models/project' require 'models/subscriber' -require 'models/teapot' require 'models/vegetables' class InheritanceTest < ActiveRecord::TestCase @@ -81,10 +80,6 @@ class InheritanceTest < ActiveRecord::TestCase assert_equal SubStiPost, SubStiPost.base_class end - def test_active_record_model_included_base_class - assert_equal Teapot, Teapot.base_class - end - def test_abstract_inheritance_base_class assert_equal LoosePerson, LoosePerson.base_class assert_equal LooseDescendant, LooseDescendant.base_class @@ -93,11 +88,7 @@ class InheritanceTest < ActiveRecord::TestCase end def test_base_class_activerecord_error - klass = Class.new { - extend ActiveRecord::Configuration - include ActiveRecord::Inheritance - } - + klass = Class.new { include ActiveRecord::Inheritance } assert_raise(ActiveRecord::ActiveRecordError) { klass.base_class } end |