test/functional/validatable_test.rb in validatable-1.6.0 vs test/functional/validatable_test.rb in validatable-1.6.1
- old
+ new
@@ -1,7 +1,20 @@
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
functional_tests do
+
+ expect false do
+ klass = Class.new do
+ include Validatable
+ attr_accessor :name
+ validates_presence_of :name
+ end
+ subclass = Class.new klass do
+ end
+ subsubclass = Class.new subclass do
+ end
+ subsubclass.new.valid?
+ end
expect false do
klass = Class.new do
include Validatable
attr_accessor :name