diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-03-10 11:53:29 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-03-10 11:53:29 +0000 |
commit | 4f2f408ba1a7dd976a1ec5061d05ef0439e5f942 (patch) | |
tree | d681ffebeda753c1df5450fef68bb298a27f3137 /actionwebservice/test/ws | |
parent | 4e8ca35defa317d22a0b7916f20a4725c235b90c (diff) | |
download | rails-4f2f408ba1a7dd976a1ec5061d05ef0439e5f942.tar.gz rails-4f2f408ba1a7dd976a1ec5061d05ef0439e5f942.tar.bz2 rails-4f2f408ba1a7dd976a1ec5061d05ef0439e5f942.zip |
allow 0, 1, '0' or '1' to be cast to the appropriate values for boolean
values.
update XML-RPC example to work in :layered mode.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@883 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/test/ws')
-rw-r--r-- | actionwebservice/test/ws/types_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionwebservice/test/ws/types_test.rb b/actionwebservice/test/ws/types_test.rb index 649fdbad7c..e66ae65945 100644 --- a/actionwebservice/test/ws/types_test.rb +++ b/actionwebservice/test/ws/types_test.rb @@ -27,6 +27,8 @@ class TypesTest < Test::Unit::TestCase assert_equal('50.0', @caster.cast(50.0, String)) assert_equal(true, @caster.cast('true', FalseClass)) assert_equal(false, @caster.cast('false', TrueClass)) + assert_equal(true, @caster.cast(1, FalseClass)) + assert_equal(false, @caster.cast(0, TrueClass)) assert_raises(TypeError) do @caster.cast('yes', FalseClass) end |