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/application/rake_test.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'railties/test/application/rake_test.rb') diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 2e7426150c..c5a68a5152 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -46,7 +46,7 @@ module ApplicationTests end rake_tasks do - task :do_nothing => :environment do + task do_nothing: :environment do end end RUBY @@ -60,7 +60,7 @@ module ApplicationTests config.eager_load = true rake_tasks do - task :do_nothing => :environment do + task do_nothing: :environment do Hello.new.world end end @@ -109,7 +109,7 @@ module ApplicationTests def test_rake_routes_calls_the_route_inspector app_file "config/routes.rb", <<-RUBY AppTemplate::Application.routes.draw do - get '/cart', :to => 'cart#show' + get '/cart', to: 'cart#show' end RUBY assert_equal "cart GET /cart(.:format) cart#show\n", Dir.chdir(app_path){ `rake routes` } @@ -118,7 +118,7 @@ module ApplicationTests def test_logger_is_flushed_when_exiting_production_rake_tasks add_to_config <<-RUBY rake_tasks do - task :log_something => :environment do + task log_something: :environment do Rails.logger.error("Sample log message") end end @@ -233,7 +233,7 @@ module ApplicationTests app_file "lib/tasks/count_user.rake", <<-RUBY namespace :user do - task :count => :environment do + task count: :environment do puts User.count end end -- cgit v1.2.3