%x( mysql --user=#{MYSQL_DB_USER} -e "create DATABASE activerecord_unittest DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci ")
%x( mysql --user=#{MYSQL_DB_USER} -e "create DATABASE activerecord_unittest2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci ")
config=ARTest.config['connections']['mysql']
%x( mysql --user=#{config['arunit']['username']} -e "create DATABASE #{config['arunit']['database']} DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci ")
%x( mysql --user=#{config['arunit2']['username']} -e "create DATABASE #{config['arunit2']['database']} DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci ")
end
desc'Drop the MySQL test databases'
task:drop_databasesdo
%x( mysqladmin --user=#{MYSQL_DB_USER} -f drop activerecord_unittest )
%x( mysqladmin --user=#{MYSQL_DB_USER} -f drop activerecord_unittest2 )
config=ARTest.config['connections']['mysql']
%x( mysqladmin --user=#{config['arunit']['username']} -f drop #{config['arunit']['database']} )
%x( mysqladmin --user=#{config['arunit2']['username']} -f drop #{config['arunit2']['database']} )