diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-04-24 21:22:12 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-04-24 21:22:12 +0900 |
commit | 0d17168289a0ce7d6972b10fb3f979363b712338 (patch) | |
tree | bd96409c9384fd42f1e8d06b1535f2346b9ea775 /railties/test/isolation | |
parent | c7f12f152918acf03bbc9788d464981816e61966 (diff) | |
download | rails-0d17168289a0ce7d6972b10fb3f979363b712338.tar.gz rails-0d17168289a0ce7d6972b10fb3f979363b712338.tar.bz2 rails-0d17168289a0ce7d6972b10fb3f979363b712338.zip |
Replace \Z to \z
\Z was a mistake of \z. Replace \Z to \z to prevent newly \Z added.
Diffstat (limited to 'railties/test/isolation')
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 924503a522..2e742a005e 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -119,7 +119,7 @@ module TestHelpers end routes = File.read("#{app_path}/config/routes.rb") - if routes =~ /(\n\s*end\s*)\Z/ + if routes =~ /(\n\s*end\s*)\z/ File.open("#{app_path}/config/routes.rb", "w") do |f| f.puts $` + "\nActiveSupport::Deprecation.silence { match ':controller(/:action(/:id))(.:format)', via: :all }\n" + $1 end @@ -251,7 +251,7 @@ module TestHelpers def add_to_config(str) environment = File.read("#{app_path}/config/application.rb") - if environment =~ /(\n\s*end\s*end\s*)\Z/ + if environment =~ /(\n\s*end\s*end\s*)\z/ File.open("#{app_path}/config/application.rb", "w") do |f| f.puts $` + "\n#{str}\n" + $1 end @@ -260,7 +260,7 @@ module TestHelpers def add_to_env_config(env, str) environment = File.read("#{app_path}/config/environments/#{env}.rb") - if environment =~ /(\n\s*end\s*)\Z/ + if environment =~ /(\n\s*end\s*)\z/ File.open("#{app_path}/config/environments/#{env}.rb", "w") do |f| f.puts $` + "\n#{str}\n" + $1 end |