test/helper.rb in mysql2xxxx-0.0.3 vs test/helper.rb in mysql2xxxx-0.0.4
- old
+ new
@@ -10,10 +10,11 @@
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'mysql2xxxx'
MYSQL_USER = 'root'
MYSQL_PASS = 'password'
+MYSQL_HOST = '127.0.0.1'
TEST_DB = 'mysql2xxxx_test'
def execute_sql(sql, db = 'mysql')
Shell.execute! %{mysql -u #{MYSQL_USER} -p#{MYSQL_PASS} --database="#{db}" --execute="#{sql}"}
end
@@ -27,9 +28,10 @@
def setup
@options = {
:execute => %{SELECT * FROM automobile_makes WHERE automobile_makes.name IN (SELECT DISTINCT automobile_make_years.make_name FROM automobile_make_years)},
:user => MYSQL_USER,
:password => MYSQL_PASS,
- :database => TEST_DB
+ :database => TEST_DB,
+ :host => MYSQL_HOST
}
end
end