mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #7470 from kennyj/fix_method_redefined_warning
Fix method redefined warnings.
This commit is contained in:
commit
844e944465
2 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue