Namespace
- MODULE ActiveRecord::ConnectionAdapters::DatabaseLimits
- MODULE ActiveRecord::ConnectionAdapters::DatabaseStatements
- MODULE ActiveRecord::ConnectionAdapters::QueryCache
- MODULE ActiveRecord::ConnectionAdapters::Quoting
- MODULE ActiveRecord::ConnectionAdapters::SchemaStatements
- CLASS ActiveRecord::ConnectionAdapters::AbstractAdapter
- CLASS ActiveRecord::ConnectionAdapters::AbstractAdapterTest
- CLASS ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter
- CLASS ActiveRecord::ConnectionAdapters::Column
- CLASS ActiveRecord::ConnectionAdapters::ColumnDefinitionTest
- CLASS ActiveRecord::ConnectionAdapters::ColumnTest
- CLASS ActiveRecord::ConnectionAdapters::ConnectionHandler
- CLASS ActiveRecord::ConnectionAdapters::ConnectionHandlerTest
- CLASS ActiveRecord::ConnectionAdapters::ConnectionManagement
- CLASS ActiveRecord::ConnectionAdapters::ConnectionManagementTest
- CLASS ActiveRecord::ConnectionAdapters::ConnectionPool
- CLASS ActiveRecord::ConnectionAdapters::ConnectionPoolTest
- CLASS ActiveRecord::ConnectionAdapters::FakeAdapter
- CLASS ActiveRecord::ConnectionAdapters::Mysql2Adapter
- CLASS ActiveRecord::ConnectionAdapters::Mysql2SchemaTest
- CLASS ActiveRecord::ConnectionAdapters::MysqlAdapter
- CLASS ActiveRecord::ConnectionAdapters::MysqlAdapterTest
- CLASS ActiveRecord::ConnectionAdapters::MysqlSchemaTest
- CLASS ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
- CLASS ActiveRecord::ConnectionAdapters::PostgreSQLAdapterTest
- CLASS ActiveRecord::ConnectionAdapters::PostgreSQLColumn
- CLASS ActiveRecord::ConnectionAdapters::QuotingTest
- CLASS ActiveRecord::ConnectionAdapters::SQLite3Adapter
- CLASS ActiveRecord::ConnectionAdapters::SQLite3AdapterTest
- CLASS ActiveRecord::ConnectionAdapters::SQLiteAdapter
- CLASS ActiveRecord::ConnectionAdapters::SchemaCache
- CLASS ActiveRecord::ConnectionAdapters::SchemaCacheTest
- CLASS ActiveRecord::ConnectionAdapters::StatementPool
- CLASS ActiveRecord::ConnectionAdapters::Table
- CLASS ActiveRecord::ConnectionAdapters::TableDefinition
Methods
- T
-
- test_dates_and_times,
- test_quote_bigdecimal,
- test_quote_bignum,
- test_quote_false,
- test_quote_fixnum,
- test_quote_float,
- test_quote_nil,
- test_quote_string,
- test_quote_true,
- test_quote_with_quoted_id,
- test_quoted_date,
- test_quoted_datetime_local,
- test_quoted_datetime_utc,
- test_quoted_time_crazy,
- test_quoted_time_local,
- test_quoted_time_utc
Instance Public methods
test_dates_and_times()
Link
test_quote_bigdecimal()
Link
test_quote_bignum()
Link
test_quote_false()
Link
test_quote_fixnum()
Link
test_quote_float()
Link
test_quote_nil()
Link
test_quote_string()
Link
# File activerecord/test/cases/quoting_test.rb, line 43 def test_quote_string assert_equal "''", @quoter.quote_string("'") assert_equal "\\\\", @quoter.quote_string("\\") assert_equal "hi''i", @quoter.quote_string("hi'i") assert_equal "hi\\\\i", @quoter.quote_string("hi\\i") end
test_quote_true()
Link
test_quote_with_quoted_id()
Link
test_quoted_date()
Link
test_quoted_datetime_local()
Link
DateTime doesn't define getlocal, so make sure it does nothing
# File activerecord/test/cases/quoting_test.rb, line 93 def test_quoted_datetime_local before = ActiveRecord::Base.default_timezone ActiveRecord::Base.default_timezone = :local t = DateTime.now assert_equal t.to_s(:db), @quoter.quoted_date(t) ensure ActiveRecord::Base.default_timezone = before end
test_quoted_datetime_utc()
Link
# File activerecord/test/cases/quoting_test.rb, line 82 def test_quoted_datetime_utc before = ActiveRecord::Base.default_timezone ActiveRecord::Base.default_timezone = :utc t = DateTime.now assert_equal t.getutc.to_s(:db), @quoter.quoted_date(t) ensure ActiveRecord::Base.default_timezone = before end
test_quoted_time_crazy()
Link
# File activerecord/test/cases/quoting_test.rb, line 73 def test_quoted_time_crazy before = ActiveRecord::Base.default_timezone ActiveRecord::Base.default_timezone = :asdfasdf t = Time.now assert_equal t.getlocal.to_s(:db), @quoter.quoted_date(t) ensure ActiveRecord::Base.default_timezone = before end
test_quoted_time_local()
Link
# File activerecord/test/cases/quoting_test.rb, line 64 def test_quoted_time_local before = ActiveRecord::Base.default_timezone ActiveRecord::Base.default_timezone = :local t = Time.now assert_equal t.getlocal.to_s(:db), @quoter.quoted_date(t) ensure ActiveRecord::Base.default_timezone = before end
test_quoted_time_utc()
Link
# File activerecord/test/cases/quoting_test.rb, line 55 def test_quoted_time_utc before = ActiveRecord::Base.default_timezone ActiveRecord::Base.default_timezone = :utc t = Time.now assert_equal t.getutc.to_s(:db), @quoter.quoted_date(t) ensure ActiveRecord::Base.default_timezone = before end