test/unit/domain_test.rb in rails-erd-1.4.7 vs test/unit/domain_test.rb in rails-erd-1.5.0
- old
+ new
@@ -184,9 +184,18 @@
create_polymorphic_generalization
create_abstract_generalization
assert_equal [Domain::Specialization] * 3, Domain.generate.specializations.collect(&:class)
end
+ test "specializations should return specializations in domain model once for descendants of abstract class" do
+ create_model "Thing" do
+ self.abstract_class = true
+ end
+ create_model "Beverage", Thing, :type => :string
+ create_model "Beer", Beverage
+ assert_equal [Domain::Specialization], Domain.generate.specializations.collect(&:class)
+ end
+
# Erroneous associations ===================================================
test "relationships should omit bad has_many associations" do
create_model "Foo" do
has_many :flabs
end