aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorNate Berkopec <nate.berkopec@gmail.com>2013-04-01 19:19:11 -0400
committerNate Berkopec <nate.berkopec@gmail.com>2013-04-02 09:50:06 -0400
commitab157ac6bef3e1aa9c3a221011c5dd7024f14d7e (patch)
tree055c41aafa6c5c96c0ce283d11cead959560842c /activerecord/test
parentabad4f7049040f3b3f29b04f27f0a3fab3065060 (diff)
downloadrails-ab157ac6bef3e1aa9c3a221011c5dd7024f14d7e.tar.gz
rails-ab157ac6bef3e1aa9c3a221011c5dd7024f14d7e.tar.bz2
rails-ab157ac6bef3e1aa9c3a221011c5dd7024f14d7e.zip
Fix #new with an STI object with complex inheritance
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/inheritance_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb
index 99d54e7526..a9be132801 100644
--- a/activerecord/test/cases/inheritance_test.rb
+++ b/activerecord/test/cases/inheritance_test.rb
@@ -194,6 +194,10 @@ class InheritanceTest < ActiveRecord::TestCase
assert_raise(ActiveRecord::SubclassNotFound) { Company.new(:type => 'Account') }
end
+ def test_new_with_complex_inheritance
+ assert_nothing_raised { Client.new(type: 'VerySpecialClient') }
+ end
+
def test_new_with_autoload_paths
path = File.expand_path('../../models/autoloadable', __FILE__)
ActiveSupport::Dependencies.autoload_paths << path