From 66529fc4d3d712a7a7e8a46f7d32114ce6498162 Mon Sep 17 00:00:00 2001 From: Vladimir Strakhov Date: Sun, 29 Jul 2012 21:16:42 +0400 Subject: fix incorrect usage `require mysql` in the activerecord/test/.../mysql_rake_test.rb --- activerecord/test/cases/tasks/mysql_rake_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/tasks/mysql_rake_test.rb b/activerecord/test/cases/tasks/mysql_rake_test.rb index 9a0eb423bd..b49561d858 100644 --- a/activerecord/test/cases/tasks/mysql_rake_test.rb +++ b/activerecord/test/cases/tasks/mysql_rake_test.rb @@ -1,5 +1,4 @@ require 'cases/helper' -require 'mysql' module ActiveRecord class MysqlDBCreateTest < ActiveRecord::TestCase @@ -46,6 +45,10 @@ module ActiveRecord class MysqlDBCreateAsRootTest < ActiveRecord::TestCase def setup + unless current_adapter?(:MysqlAdapter) + return skip("only tested on mysql") + end + @connection = stub(:create_database => true, :execute => true) @error = Mysql::Error.new "Invalid permissions" @configuration = { @@ -64,6 +67,7 @@ module ActiveRecord end def test_root_password_is_requested + skip "only if mysql is available" unless defined?(::Mysql) $stdin.expects(:gets).returns("secret\n") ActiveRecord::Tasks::DatabaseTasks.create @configuration -- cgit v1.2.3