aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorkennyj <kennyj@gmail.com>2012-08-29 02:21:39 +0900
committerkennyj <kennyj@gmail.com>2012-08-29 02:38:12 +0900
commit9063f3729b42105d1fdcede21c43e6e4ce1dcabb (patch)
treea0467f682747c0c2dd67816ea5f22acfa5c70729 /activemodel
parent1ef9b7ec7834ef3d01df72230b1e1768bfbf46f2 (diff)
downloadrails-9063f3729b42105d1fdcede21c43e6e4ce1dcabb.tar.gz
rails-9063f3729b42105d1fdcede21c43e6e4ce1dcabb.tar.bz2
rails-9063f3729b42105d1fdcede21c43e6e4ce1dcabb.zip
Fix method redefined warnings.
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/test/cases/validations/exclusion_validation_test.rb3
-rw-r--r--activemodel/test/cases/validations/inclusion_validation_test.rb3
2 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/test/cases/validations/exclusion_validation_test.rb b/activemodel/test/cases/validations/exclusion_validation_test.rb
index 9f916dbfdd..7d5af27f3d 100644
--- a/activemodel/test/cases/validations/exclusion_validation_test.rb
+++ b/activemodel/test/cases/validations/exclusion_validation_test.rb
@@ -78,6 +78,9 @@ class ExclusionValidationTest < ActiveModel::TestCase
assert p.invalid?
assert_equal ["is reserved"], p.errors[:karma]
+ p = Person.new
+ p.karma = "abe"
+
def p.reserved_karmas
%w()
end
diff --git a/activemodel/test/cases/validations/inclusion_validation_test.rb b/activemodel/test/cases/validations/inclusion_validation_test.rb
index 92638f8e70..117e9109fc 100644
--- a/activemodel/test/cases/validations/inclusion_validation_test.rb
+++ b/activemodel/test/cases/validations/inclusion_validation_test.rb
@@ -110,6 +110,9 @@ class InclusionValidationTest < ActiveModel::TestCase
assert p.invalid?
assert_equal ["is not included in the list"], p.errors[:karma]
+ p = Person.new
+ p.karma = "Lifo"
+
def p.available_karmas
%w(Lifo)
end