3
class PostgresqlActiveSchemaTest < Test::Unit::TestCase
5
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.class_eval do
6
alias_method :real_execute, :execute
7
def execute(sql, name = nil) sql end
12
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send(:alias_method, :execute, :real_execute)
15
def test_create_database_with_encoding
16
assert_equal %(CREATE DATABASE "matt" ENCODING = 'utf8'), create_database(:matt)
17
assert_equal %(CREATE DATABASE "aimonetti" ENCODING = 'latin1'), create_database(:aimonetti, :encoding => :latin1)
21
def method_missing(method_symbol, *arguments)
22
ActiveRecord::Base.connection.send(method_symbol, *arguments)