diff options
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 |