aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/inheritance_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-04-02 07:04:15 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-04-02 07:04:15 -0700
commit6fee836866ce70215247b4d1ec48730e0ff8cc7c (patch)
tree12025828e0e0f4084e387995d2c9445a7fef0e2a /activerecord/test/cases/inheritance_test.rb
parent299ddbd83cce6b2eaac001a8f1217969161771bf (diff)
parentab157ac6bef3e1aa9c3a221011c5dd7024f14d7e (diff)
downloadrails-6fee836866ce70215247b4d1ec48730e0ff8cc7c.tar.gz
rails-6fee836866ce70215247b4d1ec48730e0ff8cc7c.tar.bz2
rails-6fee836866ce70215247b4d1ec48730e0ff8cc7c.zip
Merge pull request #10038 from nateberkopec/sti-new-with-complex-inheritance
Fix regression re: #new with an STI object & complex inheritance
Diffstat (limited to 'activerecord/test/cases/inheritance_test.rb')
-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