diff options
author | Kenta Okamoto <chocoby@gmail.com> | 2013-08-11 14:27:16 +0900 |
---|---|---|
committer | Kenta Okamoto <chocoby@gmail.com> | 2013-10-18 21:56:59 +0900 |
commit | bc5148da3d39ed86fd056698a7dd285ac543c55a (patch) | |
tree | 57180c23654391f38349d325c1c67de45343aa50 /activerecord/test/cases/tasks | |
parent | 6c2810b8ed692004dca43e554982cdfdb8517b80 (diff) | |
download | rails-bc5148da3d39ed86fd056698a7dd285ac543c55a.tar.gz rails-bc5148da3d39ed86fd056698a7dd285ac543c55a.tar.bz2 rails-bc5148da3d39ed86fd056698a7dd285ac543c55a.zip |
Convert Fixnum into String the port number in MySQL
Diffstat (limited to 'activerecord/test/cases/tasks')
-rw-r--r-- | activerecord/test/cases/tasks/mysql_rake_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/cases/tasks/mysql_rake_test.rb b/activerecord/test/cases/tasks/mysql_rake_test.rb index 816bd62751..bdcf31043a 100644 --- a/activerecord/test/cases/tasks/mysql_rake_test.rb +++ b/activerecord/test/cases/tasks/mysql_rake_test.rb @@ -280,6 +280,15 @@ module ActiveRecord assert_match(/Could not dump the database structure/, warnings) end + + def test_structure_dump_with_port_number + filename = "awesome-file.sql" + Kernel.expects(:system).with("mysqldump", "--port", "10000", "--result-file", filename, "--no-data", "test-db").returns(true) + + ActiveRecord::Tasks::DatabaseTasks.structure_dump( + @configuration.merge('port' => 10000), + filename) + end end class MySQLStructureLoadTest < ActiveRecord::TestCase |