validatable 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/validatable_class_methods.rb +1 -1
- data/rakefile.rb +1 -1
- data/test/functional/validatable_test.rb +13 -0
- metadata +2 -2
@@ -23,7 +23,7 @@ module Validatable
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def all_validations
|
26
|
-
return validations + self.superclass.
|
26
|
+
return validations + self.superclass.all_validations if self.superclass.respond_to? :all_validations
|
27
27
|
validations
|
28
28
|
end
|
29
29
|
|
data/rakefile.rb
CHANGED
@@ -29,7 +29,7 @@ Gem::manage_gems
|
|
29
29
|
specification = Gem::Specification.new do |s|
|
30
30
|
s.name = "validatable"
|
31
31
|
s.summary = "Validatable is a library for adding validations."
|
32
|
-
s.version = "1.6.
|
32
|
+
s.version = "1.6.1"
|
33
33
|
s.author = 'Jay Fields'
|
34
34
|
s.description = "Validatable is a library for adding validations."
|
35
35
|
s.email = 'validatable-developer@rubyforge.org'
|
@@ -1,6 +1,19 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
2
2
|
|
3
3
|
functional_tests do
|
4
|
+
|
5
|
+
expect false do
|
6
|
+
klass = Class.new do
|
7
|
+
include Validatable
|
8
|
+
attr_accessor :name
|
9
|
+
validates_presence_of :name
|
10
|
+
end
|
11
|
+
subclass = Class.new klass do
|
12
|
+
end
|
13
|
+
subsubclass = Class.new subclass do
|
14
|
+
end
|
15
|
+
subsubclass.new.valid?
|
16
|
+
end
|
4
17
|
|
5
18
|
expect false do
|
6
19
|
klass = Class.new do
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: validatable
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.6.
|
7
|
-
date: 2007-08-
|
6
|
+
version: 1.6.1
|
7
|
+
date: 2007-08-15 00:00:00 -04:00
|
8
8
|
summary: Validatable is a library for adding validations.
|
9
9
|
require_paths:
|
10
10
|
- lib
|