From 5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Sun, 14 Oct 2012 12:03:39 +0200 Subject: Use Ruby 1.9 Hash syntax in railties --- railties/test/isolation/abstract_unit.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/test/isolation') 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 -- cgit v1.2.3