Permalink
Browse files

Don't use 1.9 hash syntax on 3-2-stable

  • Loading branch information...
1 parent 6ab1a95 commit 9c581d3811f6fba6d3d222896b017e783b6e497a @pixeltrix pixeltrix committed Dec 14, 2012
Showing with 14 additions and 14 deletions.
  1. +8 −8 actionpack/test/dispatch/routing/route_set_test.rb
  2. +6 −6 railties/test/application/routing_test.rb
@@ -19,7 +19,7 @@ def call(env)
test "url helpers are added when route is added" do
draw do
- get 'foo', to: SimpleApp.new('foo#index')
+ get 'foo', :to => SimpleApp.new('foo#index')
end
assert_equal '/foo', url_helpers.foo_path
@@ -28,8 +28,8 @@ def call(env)
end
draw do
- get 'foo', to: SimpleApp.new('foo#index')
- get 'bar', to: SimpleApp.new('bar#index')
+ get 'foo', :to => SimpleApp.new('foo#index')
+ get 'bar', :to => SimpleApp.new('bar#index')
end
assert_equal '/foo', url_helpers.foo_path
@@ -38,29 +38,29 @@ def call(env)
test "url helpers are updated when route is updated" do
draw do
- get 'bar', to: SimpleApp.new('bar#index'), as: :bar
+ get 'bar', :to => SimpleApp.new('bar#index'), :as => :bar
end
assert_equal '/bar', url_helpers.bar_path
draw do
- get 'baz', to: SimpleApp.new('baz#index'), as: :bar
+ get 'baz', :to => SimpleApp.new('baz#index'), :as => :bar
end
assert_equal '/baz', url_helpers.bar_path
end
test "url helpers are removed when route is removed" do
draw do
- get 'foo', to: SimpleApp.new('foo#index')
- get 'bar', to: SimpleApp.new('bar#index')
+ get 'foo', :to => SimpleApp.new('foo#index')
+ get 'bar', :to => SimpleApp.new('bar#index')
end
assert_equal '/foo', url_helpers.foo_path
assert_equal '/bar', url_helpers.bar_path
draw do
- get 'foo', to: SimpleApp.new('foo#index')
+ get 'foo', :to => SimpleApp.new('foo#index')
end
assert_equal '/foo', url_helpers.foo_path
@@ -235,22 +235,22 @@ def baz
controller :foo, <<-RUBY
class FooController < ApplicationController
def index
- render text: "foo"
+ render :text => "foo"
end
end
RUBY
controller :bar, <<-RUBY
class BarController < ApplicationController
def index
- render text: "bar"
+ render :text => "bar"
end
end
RUBY
app_file 'config/routes.rb', <<-RUBY
AppTemplate::Application.routes.draw do
- get 'foo', to: 'foo#index'
+ get 'foo', :to => 'foo#index'
end
RUBY
@@ -266,8 +266,8 @@ def index
app_file 'config/routes.rb', <<-RUBY
AppTemplate::Application.routes.draw do
- get 'foo', to: 'foo#index'
- get 'bar', to: 'bar#index'
+ get 'foo', :to => 'foo#index'
+ get 'bar', :to => 'bar#index'
end
RUBY
@@ -283,7 +283,7 @@ def index
app_file 'config/routes.rb', <<-RUBY
AppTemplate::Application.routes.draw do
- get 'foo', to: 'foo#index'
+ get 'foo', :to => 'foo#index'
end
RUBY

0 comments on commit 9c581d3

Please sign in to comment.