diff options
author | Ari Pollak <ajp@aripollak.com> | 2017-02-24 16:54:55 -0500 |
---|---|---|
committer | Ari Pollak <ajp@aripollak.com> | 2017-02-24 17:00:11 -0500 |
commit | cfe67a63b6d1c48fb4ddcb9cf5a303bb47036b5f (patch) | |
tree | f79ebe194a2447553f99253478c105cb198ccc1c /activerecord/test | |
parent | df050484cd3b5e888b50d2e0554a4077407459a8 (diff) | |
download | rails-cfe67a63b6d1c48fb4ddcb9cf5a303bb47036b5f.tar.gz rails-cfe67a63b6d1c48fb4ddcb9cf5a303bb47036b5f.tar.bz2 rails-cfe67a63b6d1c48fb4ddcb9cf5a303bb47036b5f.zip |
Only remove comments before the first statement
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/tasks/postgresql_rake_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/tasks/postgresql_rake_test.rb b/activerecord/test/cases/tasks/postgresql_rake_test.rb index a28217c2e6..512388af6b 100644 --- a/activerecord/test/cases/tasks/postgresql_rake_test.rb +++ b/activerecord/test/cases/tasks/postgresql_rake_test.rb @@ -240,13 +240,13 @@ if current_adapter?(:PostgreSQLAdapter) ActiveRecord::Tasks::DatabaseTasks.structure_dump(@configuration, @filename) end - def test_structure_dump_comments_removed + def test_structure_dump_header_comments_removed Kernel.stubs(:system).returns(true) - File.write(@filename, "-- comment\n not comment\n") + File.write(@filename, "-- header comment\n\n-- more header comment\n statement \n-- lower comment\n") ActiveRecord::Tasks::DatabaseTasks.structure_dump(@configuration, @filename) - assert_equal " not comment\n", File.readlines(@filename).first + assert_equal [" statement \n", "-- lower comment\n"], File.readlines(@filename).first(2) end def test_structure_dump_with_extra_flags |