Sha256: afb5062b194684edef63baeea6c60c26d4b7a7167953e2e36258c091178e3ea3
Contents?: true
Size: 693 Bytes
Versions: 6
Compression:
Stored size: 693 Bytes
Contents
# To run this script, run the following in a mysql instance: # # drop database if exists weblog_development; # create database weblog_development; # grant all on weblog_development.* to blog@localhost; # flush privileges; require 'jdbc_common' require 'db/mysql' class MysqlSimpleTest < Test::Unit::TestCase include SimpleTestMethods def test_string_quoting_oddity s = "0123456789a'a" assert_equal "'0123456789a\\'a'", ActiveRecord::Base.connection.quote(s) s2 = s[10,3] assert_equal "a'a", s2 assert_equal "'a\\'a'", ActiveRecord::Base.connection.quote(s2) end end class MysqlHasManyThroughTest < Test::Unit::TestCase include HasManyThroughMethods end
Version data entries
6 entries across 6 versions & 2 rubygems