aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/association_inheritance_reload.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/association_inheritance_reload.rb')
-rw-r--r--activerecord/test/association_inheritance_reload.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/activerecord/test/association_inheritance_reload.rb b/activerecord/test/association_inheritance_reload.rb
new file mode 100644
index 0000000000..a3d5722841
--- /dev/null
+++ b/activerecord/test/association_inheritance_reload.rb
@@ -0,0 +1,14 @@
+require 'abstract_unit'
+require 'fixtures/company'
+
+class AssociationInheritanceReloadTest < Test::Unit::TestCase
+ fixtures :companies
+
+ def test_set_attributes
+ assert_equal ["errors.add_on_empty('name', \"can't be empty\")"], Firm.read_inheritable_attribute("validate"), "Second run"
+ # ActiveRecord::Base.reset_column_information_and_inheritable_attributes_for_all_subclasses
+ remove_subclass_of(ActiveRecord::Base)
+ load 'fixtures/company.rb'
+ assert_equal ["errors.add_on_empty('name', \"can't be empty\")"], Firm.read_inheritable_attribute("validate"), "Second run"
+ end
+end \ No newline at end of file