Methods
- I
- Q
- S
- T
-
- test_quoting_binary_strings,
- test_type_cast_bigdecimal,
- test_type_cast_binary_encoding_without_logger,
- test_type_cast_date,
- test_type_cast_false,
- test_type_cast_nil,
- test_type_cast_numeric,
- test_type_cast_object_which_responds_to_quoted_id,
- test_type_cast_string,
- test_type_cast_symbol,
- test_type_cast_time,
- test_type_cast_true,
- test_type_cast_unknown_should_raise_error
Instance Public methods
id()
Link
quoted_id()
Link
setup()
Link
test_quoting_binary_strings()
Link
test_type_cast_bigdecimal()
Link
test_type_cast_binary_encoding_without_logger()
Link
# File activerecord/test/cases/adapters/sqlite3/quoting_test.rb, line 16 def test_type_cast_binary_encoding_without_logger @conn.extend(Module.new { def logger; end }) column = Column.new(nil, nil, Type::String.new) binary = SecureRandom.hex expected = binary.dup.encode!(Encoding::UTF_8) assert_equal expected, @conn.type_cast(binary, column) end
test_type_cast_date()
Link
test_type_cast_false()
Link
test_type_cast_nil()
Link
test_type_cast_numeric()
Link
test_type_cast_object_which_responds_to_quoted_id()
Link
# File activerecord/test/cases/adapters/sqlite3/quoting_test.rb, line 87 def test_type_cast_object_which_responds_to_quoted_id quoted_id_obj = Class.new { def quoted_id "'zomg'" end def id 10 end }.new assert_equal 10, @conn.type_cast(quoted_id_obj, nil) quoted_id_obj = Class.new { def quoted_id "'zomg'" end }.new assert_raise(TypeError) { @conn.type_cast(quoted_id_obj, nil) } end
test_type_cast_string()
Link
# File activerecord/test/cases/adapters/sqlite3/quoting_test.rb, line 61 def test_type_cast_string assert_equal '10', @conn.type_cast('10', nil) c = Column.new(nil, 1, Type::Integer.new) assert_equal 10, @conn.type_cast('10', c) c = Column.new(nil, 1, Type::Float.new) assert_equal 10.1, @conn.type_cast('10.1', c) c = Column.new(nil, 1, Type::Binary.new) assert_equal '10.1', @conn.type_cast('10.1', c) c = Column.new(nil, 1, Type::Date.new) assert_equal '2016-05-11', @conn.type_cast('2016-05-11 19:00:00', c) end
test_type_cast_symbol()
Link
test_type_cast_time()
Link
test_type_cast_true()
Link