aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-18 11:54:11 -0800
committerJosé Valim <jose.valim@gmail.com>2011-12-18 11:54:11 -0800
commit81deb346afdf5e0de04b10dd4150dfadc3e9060a (patch)
treeb984f79fd3d4523cebc11cbad4d34854534d38ee /railties
parentde2306f10cc8c0f91bf9fe3ef5c7e3daee9035f6 (diff)
parenta2249eee760a84385dd5af8d9ee084123bc173e3 (diff)
downloadrails-81deb346afdf5e0de04b10dd4150dfadc3e9060a.tar.gz
rails-81deb346afdf5e0de04b10dd4150dfadc3e9060a.tar.bz2
rails-81deb346afdf5e0de04b10dd4150dfadc3e9060a.zip
Merge pull request #4019 from kommen/rake_db_structure
Make structure.sql file configureable in db:structure:dump analog to SCHEMA in db:schema:dump
Diffstat (limited to 'railties')
-rw-r--r--railties/test/application/rake_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb
index 4e406f23d2..d4d4e4e5ff 100644
--- a/railties/test/application/rake_test.rb
+++ b/railties/test/application/rake_test.rb
@@ -133,5 +133,13 @@ module ApplicationTests
assert_match(/7 tests, 10 assertions, 0 failures, 0 errors/, content)
end
+
+ def test_rake_dump_structure_should_respect_db_structure_env_variable
+ Dir.chdir(app_path) do
+ `bundle exec rake db:migrate` # ensure we have a schema_migrations table to dump
+ `bundle exec rake db:structure:dump DB_STRUCTURE=db/my_structure.sql`
+ end
+ assert File.exists?(File.join(app_path, 'db', 'my_structure.sql'))
+ end
end
end