diff options
author | Vladimir Strakhov <vl.strakhov@gmail.com> | 2012-07-29 21:16:42 +0400 |
---|---|---|
committer | Vladimir Strakhov <vl.strakhov@gmail.com> | 2012-07-29 21:17:17 +0400 |
commit | 66529fc4d3d712a7a7e8a46f7d32114ce6498162 (patch) | |
tree | 7bc716ecb6b5538a41b681d0c70931de4b72e678 /activerecord/test/cases/tasks | |
parent | 1f870a2c5911b2eec519062486a74a725e924b3d (diff) | |
download | rails-66529fc4d3d712a7a7e8a46f7d32114ce6498162.tar.gz rails-66529fc4d3d712a7a7e8a46f7d32114ce6498162.tar.bz2 rails-66529fc4d3d712a7a7e8a46f7d32114ce6498162.zip |
fix incorrect usage `require mysql` in the activerecord/test/.../mysql_rake_test.rb
Diffstat (limited to 'activerecord/test/cases/tasks')
-rw-r--r-- | activerecord/test/cases/tasks/mysql_rake_test.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |