diff options
author | Kevin Mook <kevin@kevinmook.com> | 2013-10-21 13:30:05 -0400 |
---|---|---|
committer | Kevin Mook <kevin@kevinmook.com> | 2013-10-21 13:30:05 -0400 |
commit | a733e00b10e5f17a7fc70e55e9b1949a5e1128be (patch) | |
tree | 27e59ba2c4840ae470ff3fac9141e4476af2664a /activerecord/test/cases | |
parent | 19639c7184bf40054dcedbbfe00eff164abf133f (diff) | |
download | rails-a733e00b10e5f17a7fc70e55e9b1949a5e1128be.tar.gz rails-a733e00b10e5f17a7fc70e55e9b1949a5e1128be.tar.bz2 rails-a733e00b10e5f17a7fc70e55e9b1949a5e1128be.zip |
Fix loading a sql structure file on postgres when the file's path has whitespace in it
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/tasks/postgresql_rake_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/tasks/postgresql_rake_test.rb b/activerecord/test/cases/tasks/postgresql_rake_test.rb index f31896bc7f..90dac6399d 100644 --- a/activerecord/test/cases/tasks/postgresql_rake_test.rb +++ b/activerecord/test/cases/tasks/postgresql_rake_test.rb @@ -231,6 +231,13 @@ module ActiveRecord ActiveRecord::Tasks::DatabaseTasks.structure_load(@configuration, filename) end + + def test_structure_load_accepts_path_with_spaces + filename = "awesome file.sql" + Kernel.expects(:system).with("psql -q -f awesome\\ file.sql my-app-db") + + ActiveRecord::Tasks::DatabaseTasks.structure_load(@configuration, filename) + end end end |