class ActiveModel::Type::BinaryTest

Public Instance Methods

test_type_cast_binary() click to toggle source
# File activemodel/test/cases/type/binary_test.rb, line 9
def test_type_cast_binary
  type = Type::Binary.new
  assert_nil type.cast(nil)
  assert_equal "1", type.cast("1")
  assert_equal 1, type.cast(1)
end