diff options
author | kennyj <kennyj@gmail.com> | 2012-08-29 02:21:39 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-08-29 02:38:12 +0900 |
commit | 9063f3729b42105d1fdcede21c43e6e4ce1dcabb (patch) | |
tree | a0467f682747c0c2dd67816ea5f22acfa5c70729 /activemodel | |
parent | 1ef9b7ec7834ef3d01df72230b1e1768bfbf46f2 (diff) | |
download | rails-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.rb | 3 | ||||
-rw-r--r-- | activemodel/test/cases/validations/inclusion_validation_test.rb | 3 |
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 |