diff options
author | Dieter Komendera <dieter@komendera.com> | 2011-12-18 20:43:36 +0100 |
---|---|---|
committer | Dieter Komendera <dieter@komendera.com> | 2011-12-18 20:43:36 +0100 |
commit | a2249eee760a84385dd5af8d9ee084123bc173e3 (patch) | |
tree | 1a4651519f3ea8fe7e53ebec12877c53d6f291aa /railties/test | |
parent | aa92d3732cdc75c4b5788233cb86148c04871d0d (diff) | |
download | rails-a2249eee760a84385dd5af8d9ee084123bc173e3.tar.gz rails-a2249eee760a84385dd5af8d9ee084123bc173e3.tar.bz2 rails-a2249eee760a84385dd5af8d9ee084123bc173e3.zip |
Rename STRUCTURE to DB_STRUCTURE, update dump task description and add simple testcase.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/rake_test.rb | 8 |
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 |