Add JdbcAdapter#truncate_table
This commit is contained in:
parent
ddc8bd1dc2
commit
6a646819d7
|
@ -13,6 +13,12 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
class JdbcAdapter
|
||||
def truncate_table(table_name)
|
||||
execute("TRUNCATE TABLE #{table_name};")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'database_cleaner/active_record/truncation'
|
|||
require 'active_record'
|
||||
module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
[MysqlAdapter, SQLite3Adapter].each do |adapter|
|
||||
[MysqlAdapter, SQLite3Adapter, JdbcAdapter].each do |adapter|
|
||||
describe adapter, "#truncate_table" do
|
||||
it "should truncate the table"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue