test/unit/specialization_test.rb in rails-erd-1.0.0 vs test/unit/specialization_test.rb in rails-erd-1.1.0
- old
+ new
@@ -33,15 +33,25 @@
create_specialization
assert_equal [false], Domain.generate.specializations.map(&:polymorphic?)
end
test "inheritance should be false for polymorphic specializations" do
- create_generalization
+ create_polymorphic_generalization
assert_equal [false], Domain.generate.specializations.map(&:inheritance?)
end
test "polymorphic should be true for polymorphic specializations" do
- create_generalization
+ create_polymorphic_generalization
+ assert_equal [true], Domain.generate.specializations.map(&:polymorphic?)
+ end
+
+ test "inheritance should be false for abstract specializations" do
+ create_abstract_generalization
+ assert_equal [false], Domain.generate.specializations.map(&:inheritance?)
+ end
+
+ test "polymorphic should be true for abstract specializations" do
+ create_abstract_generalization
assert_equal [true], Domain.generate.specializations.map(&:polymorphic?)
end
test "inheritance should be false for polymorphic specializations to specialized entities" do
create_model "Cannon"