diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2012-10-14 12:03:39 +0200 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2012-10-14 18:26:58 +0200 |
commit | 5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3 (patch) | |
tree | 9e58227af8a363398a03b8010156d5a84d59dea9 /railties/test/isolation | |
parent | ca618d473dcb9b5cc4000d057df9322376900622 (diff) | |
download | rails-5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3.tar.gz rails-5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3.tar.bz2 rails-5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3.zip |
Use Ruby 1.9 Hash syntax in railties
Diffstat (limited to 'railties/test/isolation')
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 0f36eb67e5..e59488f97d 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -113,14 +113,14 @@ module TestHelpers routes = File.read("#{app_path}/config/routes.rb") if routes =~ /(\n\s*end\s*)\Z/ File.open("#{app_path}/config/routes.rb", 'w') do |f| - f.puts $` + "\nmatch ':controller(/:action(/:id))(.:format)', :via => :all\n" + $1 + f.puts $` + "\nmatch ':controller(/:action(/:id))(.:format)', via: :all\n" + $1 end end add_to_config <<-RUBY config.eager_load = false config.secret_token = "3b7cd727ee24e8444053437c36cc66c4" - config.session_store :cookie_store, :key => "_myapp_session" + config.session_store :cookie_store, key: "_myapp_session" config.active_support.deprecation = :log config.action_controller.allow_forgery_protection = false RUBY @@ -139,7 +139,7 @@ module TestHelpers app = Class.new(Rails::Application) app.config.eager_load = false app.config.secret_token = "3b7cd727ee24e8444053437c36cc66c4" - app.config.session_store :cookie_store, :key => "_myapp_session" + app.config.session_store :cookie_store, key: "_myapp_session" app.config.active_support.deprecation = :log yield app if block_given? @@ -157,7 +157,7 @@ module TestHelpers controller :foo, <<-RUBY class FooController < ApplicationController def index - render :text => "foo" + render text: "foo" end end RUBY |