diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-07-04 14:10:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-04 14:10:14 -0400 |
commit | 1729d3b4b2ea96becbb473c982a78d2cf957ce6d (patch) | |
tree | 107b989946317fd9828f0ca7399f2ae1a77ffef4 /activerecord/test/cases | |
parent | b115dd17e44e39b62e3c4f18a749beaa8d10b51f (diff) | |
parent | 0ba55d2e0c251451eede1da069666eb15e86b2c7 (diff) | |
download | rails-1729d3b4b2ea96becbb473c982a78d2cf957ce6d.tar.gz rails-1729d3b4b2ea96becbb473c982a78d2cf957ce6d.tar.bz2 rails-1729d3b4b2ea96becbb473c982a78d2cf957ce6d.zip |
Merge pull request #29653 from kamipo/fix_test_copying_migrations_preserving_magic_comments
Fix `test_copying_migrations_preserving_magic_comments`
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index 3a49a41580..eff6e09eb7 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -1015,8 +1015,8 @@ class CopyMigrationsTest < ActiveRecord::TestCase assert File.exist?(@migrations_path + "/4_currencies_have_symbols.bukkits.rb") assert_equal [@migrations_path + "/4_currencies_have_symbols.bukkits.rb"], copied.map(&:filename) - expected = "# coding: ISO-8859-15\n# This migration comes from bukkits (originally 1)" - assert_equal expected, IO.readlines(@migrations_path + "/4_currencies_have_symbols.bukkits.rb")[0..1].join.chomp + expected = "# frozen_string_literal: true\n# coding: ISO-8859-15\n# This migration comes from bukkits (originally 1)" + assert_equal expected, IO.readlines(@migrations_path + "/4_currencies_have_symbols.bukkits.rb")[0..2].join.chomp files_count = Dir[@migrations_path + "/*.rb"].length copied = ActiveRecord::Migration.copy(@migrations_path, bukkits: MIGRATIONS_ROOT + "/magic") |