diff options
author | rohit <rohit.arondekar@gmail.com> | 2010-05-18 05:54:53 +0530 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-18 03:10:55 +0200 |
commit | 05e3fb45eeacd20f2b8b5691f17d6fdf2fb4582b (patch) | |
tree | d4816ca34ff4a077c836d65d2fc1bf104f191838 /activemodel/test/cases/validations/numericality_validation_test.rb | |
parent | 73f0e1a8423d53370f272841ce29747434de4d9a (diff) | |
download | rails-05e3fb45eeacd20f2b8b5691f17d6fdf2fb4582b.tar.gz rails-05e3fb45eeacd20f2b8b5691f17d6fdf2fb4582b.tar.bz2 rails-05e3fb45eeacd20f2b8b5691f17d6fdf2fb4582b.zip |
Add a valid hex that shouldn't be valid to ActiveModel numericality tests [#4622 state:commited]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activemodel/test/cases/validations/numericality_validation_test.rb')
-rw-r--r-- | activemodel/test/cases/validations/numericality_validation_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/test/cases/validations/numericality_validation_test.rb b/activemodel/test/cases/validations/numericality_validation_test.rb index 963ad6450b..8e77a0222e 100644 --- a/activemodel/test/cases/validations/numericality_validation_test.rb +++ b/activemodel/test/cases/validations/numericality_validation_test.rb @@ -18,7 +18,7 @@ class NumericalityValidationTest < ActiveModel::TestCase FLOATS = [0.0, 10.0, 10.5, -10.5, -0.0001] + FLOAT_STRINGS INTEGERS = [0, 10, -10] + INTEGER_STRINGS BIGDECIMAL = BIGDECIMAL_STRINGS.collect! { |bd| BigDecimal.new(bd) } - JUNK = ["not a number", "42 not a number", "0xdeadbeef", "0xinvalidhex", "00-1", "--3", "+-3", "+3-1", "-+019.0", "12.12.13.12", "123\nnot a number"] + JUNK = ["not a number", "42 not a number", "0xdeadbeef", "0xinvalidhex", "0Xdeadbeef", "00-1", "--3", "+-3", "+3-1", "-+019.0", "12.12.13.12", "123\nnot a number"] INFINITY = [1.0/0.0] def test_default_validates_numericality_of |