diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-04-19 19:00:06 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-04-19 19:00:06 +0000 |
commit | 3cf461323c0401e56e4a7d7962745bbbe5316fd1 (patch) | |
tree | 0a18c1c99d70a580185f55018f0ff662a9638c2e /actionwebservice/test/casting_test.rb | |
parent | 41bc063e17107c1de0a907cbecc3fb1882ce8863 (diff) | |
download | rails-3cf461323c0401e56e4a7d7962745bbbe5316fd1.tar.gz rails-3cf461323c0401e56e4a7d7962745bbbe5316fd1.tar.bz2 rails-3cf461323c0401e56e4a7d7962745bbbe5316fd1.zip |
Fix regression where nil values were incorrectly being cast into the
default values for their base types.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/test/casting_test.rb')
-rw-r--r-- | actionwebservice/test/casting_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionwebservice/test/casting_test.rb b/actionwebservice/test/casting_test.rb index 223313564b..aa8941da17 100644 --- a/actionwebservice/test/casting_test.rb +++ b/actionwebservice/test/casting_test.rb @@ -62,8 +62,8 @@ class TC_Casting < Test::Unit::TestCase def test_array_type_casting assert_equal [1, 2, 3213992, 4], cast_expects(:int_array, ['1', '2', '3213992', '4'])[0] - assert_equal ['one', 'two', '5.0', '200', '', 'true'], cast_expects(:str_array, [:one, 'two', 5.0, 200, nil, true])[0] - assert_equal [true, false, true, true, false], cast_expects(:bool_array, ['1', nil, 'y', true, 'false'])[0] + assert_equal ['one', 'two', '5.0', '200', nil, 'true'], cast_expects(:str_array, [:one, 'two', 5.0, 200, nil, true])[0] + assert_equal [true, nil, true, true, false], cast_expects(:bool_array, ['1', nil, 'y', true, 'false'])[0] end def test_array_type_casting_failure |