aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/test/support/ddl_helper.rb
blob: 43cb235e0162e0e608ea53788440ceafc6e396a2 (plain) (tree)
1
2
3
4
5
6
7
8

                                                                  
                                                                   

         
                                                  

     
module DdlHelper
  def with_example_table(connection, table_name, definition = nil)
    connection.execute("CREATE TABLE #{table_name}(#{definition})")
    yield
  ensure
    connection.execute("DROP TABLE #{table_name}")
  end
end